Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have created a chart that uses a Set Analysis (in the expression)
The backgrounds color should depend on values : if KPI1 > KPI2, then blue, else yellow
Then, I have to use the same Set Analysis in order to define the color definition
Example :
If the expression is :
=sum({$<dProduct={'ProductA'}>}KPI1)
the color definition should be :
=if(sum({$<dProduct={'ProductA'}>}KPI1) > sum({$<dProduct={'ProductA'}>}KPI2), blue(), yellow())
(I have attached an example)
This behaviour is logical (I have to consider the same set), but it is also very difficult if I want to industrialize the application... because it is not possible to store the color definition into a variable
Indeed, the color definition could be
=if(sum(KPI1) > sum(KPI2), blue(), yellow())
OR
=if(sum({$<dProduct={'ProductA'}>}KPI1) > sum({$<dProduct={'ProductA'}>}KPI2), blue(), yellow())
OR
=if(sum({$<dYear={$(maxYear)}>}KPI1) > sum({$<dYear={$(maxYear)}>}>}KPI2), blue(), yellow())
and so on... (and my application is much more complicated...)
Do you have any idea how to manage this ?
you forgot ")"
=if(sum(KPI1)>sum(KPI2),blue(), Yellow())
hope that help