Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
Last 5 days | Qty |
01/03/2020 | 20 |
02/03/2020 | 40 |
03/03/2020 | 20 |
04/03/2020 | 10 |
05/03/2020 | 25 |
06/03/2020 | 10 |
I want to color the column 1(Qty) based on average of last 5 days.
I.e
Avg is 21
will compare with each column and change the background of color.
I'm also using same expression but it is not working.
And i have small doubt in Qty column in your application. Qty column is not calculated using SUM aggregate function. your are using that column like a dimension.
But in my model we calculate the overall sales for that day using expression like Sum(kpi_Qty). Thats why the expression is not working for me.
Better use measure column as qty and use that expression(Background expression) and let me know whether is working or not.
Hi,
it is working for me
see below screenshot
Background color expression
=if(Sum(Qty)>Avg(total Qty),Green(),White())
or
=if(Aggr(Sum(Qty),days)>Avg(total Qty),Green(),White())