Multiple
Measure Selection For A Graph- INDEXCOL
To display the measure columns in
the graph, but not all the measures at the same time. User will select the name
of the measure columns to select from the prompt. And the measure which the
user selects should be painted on the graph.
So, going forward I preferred to give the option to select the number of measures in check box (thanks to OBIEE 11g to provide the check box option as default).
First we need to create the prompt with the check box. I am considering to have two measure columns. For our requirement we need to display the first measure prompt as the default selection. So including the default selection as 1.
Remember when you are passing the presentation variable values then it accepts the number data type in this case to paint on the graph. So I am passing 1 for the first prompt and 2 for the second prompt.
In the report I am pulling three
columns ie., first is the dimension column, second is the first measure column
and third is the second measure column.
In the column formula we can write
case statements, but I am preferring to put down the formula using the INDEXCOL
function.
Similarily I am using the INDEXCOL function in the second column formula.
Similarily I am using the INDEXCOL function in the second column formula.
Check the results in the compound layout and yes both the measure columns
doesnt produce results and is expected.
Save and view the report in the
dashboard.
By default the 1st prompt measure column is selected.
By default the 1st prompt measure column is selected.
When we select the second prompt
measure column then both the measure columns display with beauty.
Good post. but this solution is not working for more than 2 measures. its giving an error "Index col argument is out of range in the expression list". Any suggestions.
ReplyDeleteYeah tried with three measures its not working.. Is there any way where can have column selector with check box option .. I mean selecting multiple measures for graph comparison?
ReplyDelete