Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following chart:
Dimension: MonthYear
Expression: Count(Distinct OrderID)
In background colour for the expression is If(Count(DISTINCT OrderID) > $(vAVGOrders), LightBlue(), LightGreen())
My variable vAVGOrders expression is: Avg(Aggr(Count(DISTINCT OrderID), MonthYear))
Why doesn't my chart above change to lightblue colour when the line is going over Avg # Orders? What do I need to change please?
Put an = character in front of the expression in the variable so that it's calculated outside the context of the chart. Otherwise it will be calculated for every MonthYear value and then the average is always the same as the count because the average will be calculated on only one value.
Put an = character in front of the expression in the variable so that it's calculated outside the context of the chart. Otherwise it will be calculated for every MonthYear value and then the average is always the same as the count because the average will be calculated on only one value.
May be try with this as your variable:
Avg(TOTALAggr(Count(DISTINCT OrderID), MonthYear))
Thanks guys you are both correct.