Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I've four different Master Measures that i would like to display in one Bar Chart.
All of them should be coloured based on avg value: if > 0 -> green, if <= 0 -> red.
I totally get how to do it for one measure, but to separately colour 4 of them in one expression is too much for me.
In best case i expect something like this to work, but it is not 😞
if(avg([VisitsVs2019])>0,green(),red())
if(avg([VisitsVs2020])>0,green(),red())
if(avg([VisitsVs2021])>0,green(),red())
if(avg([VisitsVs2022])>0,green(),red())
No idea if this is changing anything, but im using QuickCloud
Please help! 😉
Hi,
Simple if condition will be the below.
if(avg([YourField])>0,green(),
if(avg([YourField])>0,green(),
if(avg([YourField])>0,green(),
if(avg([YourField])>0,green(),red()
)))) // nested if condition
this condition should be in color expression of a table.
Thank You Sir for suggestion!
I've checked it and i got message like that:
"Error in expression: if takes 2-3 parameters" and whole expression is listed.
And every column on Bar Chart is grayed out. Any idea why?
Hi,
Please try the below,
if(avg([VisitsVs2019])>0,green(),
if(avg([VisitsVs2020])>0,green(),
if(avg([VisitsVs2021])>0,green(),
if(avg([VisitsVs2022])>0,green(),red()
)))) // nested if condition
It is not returning any errors, but all columns are now coloured green.
And column1 (VisitsVs2019) is below 0 so i would like it to be coloured red and next column2 (VisitsVs2020) as above 0 should be coloured green 😉
Once again thank You very much for You time ❤️