Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a graph comparing 2 quarters, users can select any 2 quarters to compare and the graph updates accordingly. I am accepting 2 variables from users (each for one quarter) and using set expression for my X axis on the graph.
The expression looks like this -
=Sum({<YearQuarter= {'$(vYearQuarter1)'}>}MValue) - Sum({<Year = {'$(vYearQuarter2)'}>}MValue)
Now I want to obtain min and max values for the above set expression i.e. the min and max values from my X axis and use that as an input to the slider such that users will have ability to filter the values on X axis (e.g. to weed out the outliers). I will use a variable to capture the threshold set by slider and will show only values greater than the slider threshold. So my above graph expression will be
=IF(Sum({<YearQuarter= {'$(vYearQuarter1)'}>}MValue) - Sum({<Year = {'$(vYearQuarter2)'}>}MValue) > vthreshold, =Sum({<YearQuarter= {'$(vYearQuarter1)'}>}MValue) - Sum({<Year = {'$(vYearQuarter2)'}>}MValue))
But when I try to use Min and Max on the above set expression, I get garbage value error
=Min(Sum({<YearQuarter= {'$(vYearQuarter1)'}>}MValue) - Sum({<Year = {'$(vYearQuarter2)'}>}MValue))
How do I get the min and max values from the above expression i.e. min and max values for my X axis.
Thanks!
Try this:
For Min:
=Min(Aggr(Sum({<YearQuarter= {'$(vYearQuarter1)'}>}MValue) - Sum({<Year = {'$(vYearQuarter2)'}>}MValue), YourChartDimensions)
For Max:
=Max(Aggr(Sum({<YearQuarter= {'$(vYearQuarter1)'}>}MValue) - Sum({<Year = {'$(vYearQuarter2)'}>}MValue), YourChartDimensions)
HTH
Best,
Sunny
Try this:
For Min:
=Min(Aggr(Sum({<YearQuarter= {'$(vYearQuarter1)'}>}MValue) - Sum({<Year = {'$(vYearQuarter2)'}>}MValue), YourChartDimensions)
For Max:
=Max(Aggr(Sum({<YearQuarter= {'$(vYearQuarter1)'}>}MValue) - Sum({<Year = {'$(vYearQuarter2)'}>}MValue), YourChartDimensions)
HTH
Best,
Sunny
worked perfectly! thanks!
Awesome