Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I created a Trellis barchart with 2 dimensions (territory and orderyear) and 1 expression (sum of OrderSubTotal)
In order to avoid that document filters effect the chart, the {1} set identifier is used in the expression =Sum ({1}OrderSubTotal)
To emphasize the last year, the background color of the expression was changed to =if(OrderYear=$(LastYear),lightred(),color(1))
If you filter the data, e.g. territory='Europe', the values of the chart don't change, but the background color is also filtered (see screenshot)
How to overcome this problem?
Try this instead to ingore the selections for the background color expression too:
=if(only({1}OrderYear)=$(LastYear),lightred(),color(1))
Try this instead to ingore the selections for the background color expression too:
=if(only({1}OrderYear)=$(LastYear),lightred(),color(1))
Please try below code
Sum ({<territory=>}OrderSubTotal)
it will avoid territory field selection and color also will remains .
Hey Hans,
Try something like,
=if(OrderYear=Max({1}TOTAL $(LastYear)),lightred(),color(1))
Hi, try this expressions:
Sum({<Territory=,OrderYear=>} OrderSubTotal)
For the background color:
If(Only({<Territory=,OrderYear=>} OrderYear)=Max(Total {<territory=,OrderYear=>} OrderYear),LightRed(),Color(1))
Indeed,
Adding the 'Only' agregate function with de {1} did the trick!!!
Now I have a great example for my students where the ONLY is to be used 😉
Thanks