Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts,
I need your help in writing an expression.
I have:
MEASURE:
round(
fabs(
Sum({$<DATE={"$(=date(rangemin(today()-2,MAX(DATE)-1)))"}, DIM={"6", "22"}>}VALUE)
)
-
fabs(
Sum({$<DATE={"$(=date(rangemin(today()-1,MAX(DATE))))"}, DIM={"6", "22"}>}VALUE)
)
)
This expression works fine, it gives me sum of all differences in values for last 2 days. It works very good in a table, where a have:
CLIENT MEASURE
A 100 000
B 30 000
C 5 000
....
I sorted numerically asc, and took fixed number option, and top 10 values.
In table this is okay.
But how to take sum of 10 biggest results of this measure in KPI?
Thanks
Regards,
Jasmina
May be this
Sum(Aggr(
If(Rank(
(Round(fabs(Sum({$<DATE={"$(=date(rangemin(today()-2,MAX(DATE)-1)))"}, DIM={"6", "22"}>}VALUE))-
fabs(Sum({$<DATE={"$(=date(rangemin(today()-1,MAX(DATE))))"}, DIM={"6", "22"}>}VALUE)))) < 11,
(Round(fabs(Sum({$<DATE={"$(=date(rangemin(today()-2,MAX(DATE)-1)))"}, DIM={"6", "22"}>}VALUE))-
fabs(Sum({$<DATE={"$(=date(rangemin(today()-1,MAX(DATE))))"}, DIM={"6", "22"}>}VALUE)))
, CLIENT))