Using Dimensionally Modeled Relational (or DMR’s) for reports in recent projects, I’ve come over a requirement for selecting a measure for display via value box prompt fo crosstabs.
It’s very simple with dimensions (let’s forget MUN’s and etc) but not that straight-forward with measures.
I did the first thing that came to my mind, maybe you know a better solution.
Suppose we have a DMR with 2 measures (A and B). What to do to have a measure prompt.
1 Create a value-box prompt with parameter ?measure?, no filter, no query source, just 2 static choices ‘A’ and ‘B’. Set autosubmit and default choice of ‘A’.
2 Create a new data item in a query, called ‘Selective_Measure’, with following formula:
case ?measure?
when ‘A’ then [DMR].[Measures].[A],
when ‘B’ then [DMR].[Measures].[B]
end
3 Drop this new ‘Selective_Measure’ into cross-tab, and there you go.
I don’t like this variant due to extensibility problems (adding new cases), so I’ll be thinking of smth more ‘dynamic’.
Maybe attaching measure selections to a query and trying to convert them into measures in a formula…