cancel
Showing results for 
Search instead for 
Did you mean: 

SAC Analytical Application: Measure Filter Syntax

andrewbarlow1
Participant

Hi, I am trying to set a filter on a chart to only show the measure "engine_Def" with values between the variable's min_DEF and max_DEF so a range filter. Can anybody help me with the syntax for this? I have tried the below but it seems to silently fail and does not show anything in the console of the browser?

Chart_1.getDataSource().setDimensionFilter("[Account].[parentId].&[engine_Def]",{from: ConvertUtils.numberToString(min_DEF), to: ConvertUtils.numberToString(max_DEF)});<br>

Accepted Solutions (1)

Accepted Solutions (1)

eeddggaarr
Contributor
0 Kudos

Hi Andrew,

until someone comes up with a better solution:
you could create a calculated measure which shows the result of if conditionbelow:

IF(engine_Def < [@min] OR engine_Def > [@max];
        0;
        engine_Def
)

min and max are 2 script variables type number (switch to integer if needed).
those script variables could have a fixed default value or you can use e.g. a range slider and read min and max from user interaction.
with zero suppression activated you will only show values between your range.

br

edgar

andrewbarlow1
Participant
0 Kudos

Wow - Edgar - talk about thinking outside the box - I was racking my brain over this. Thankyou very much - this works exactly as I wanted it to.

Answers (0)