Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I created a Distribution Plot, and want to see how to make the dot colors change based on whether its value is above or below the average for that dimension. I tried this, but it didn't work as expected...
=if(DurationMinutes > (Avg({<EventCategory={'Surgical'}>}DurationMinutes)), red(), blue())
Any suggestions?
Thanks in advance,
Chris
Hi, not sure to understand what you want to compare, the TOTAL option might work, if you want to add additional segmentatation you can use: Avg(TOTAL <DimensionField> ...
Hi, it will be better if you have a variable with that expression, so it's calculated for the whole selections, and ignoring the dimension.
Create a variable vDuratonMinutes with value: =Avg({<EventCategory={'Surgical'}>}DurationMinutes)
Then you can use this variable:=if(DurationMinutes > $(vDuratonMinutes), red(), blue())
Another way can be using TOTAL qualifier to ignore dimensions:
=if(DurationMinutes > (Avg(TOTAL {<EventCategory={'Surgical'}>}DurationMinutes)), red(), blue())
Thanks for your helpful reply Rubenmarin.
But actually, we need the colors to be conditional based on each dimension's avg value. This is because we don't want to compare the values vs the full dataset's avg, but vs others within the same dimension. Hope that makes sense.
Thanks,
Chris
Hi, not sure to understand what you want to compare, the TOTAL option might work, if you want to add additional segmentatation you can use: Avg(TOTAL <DimensionField> ...