Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
ID | Days | max(days)-min(days)-currentvalue |
---|---|---|
A | 5 | 0 |
B | 7 | -2 |
C | 2 | 3 |
Hi experts,
I have a straight table with ID and Days. ID is the dimension and Days is expression. i want to create the 3rd column as an expression but i do not know how to write the expression.
I want to find out the max number of days (7) and min number of days (2) in Days column and use that number (5) minus the value in Days.
as the selections changes, the max number of days and min number of days will be changed dynamically.
How do I achieve this?
thanks!
You can.... I just like using RangeSum as + and - can't handle nulls, whereas RangeSum can.... you can use this
Max(TOTAL Aggr(DaysExpressionHere, ID)) - Min(TOTAL Aggr(DaysExpressionHere, ID)) - Days