Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi friends!
Help to write the formula that calculates values for the previous period inside current period in chart.
Like on screenshot below:
Trying to calculate measure "VALUE PREV DATE"
Sum(Aggr(sum({<Date={"$(=If(Dimensionality()=0,
Date(MonthEnd(AddMonths(max(Date),-1))),
Date(MonthEnd(AddMonths(max(Date),-1)))))"}>} [VALUE]),TB))
Doesnt works, because showing single value
Please help!
Thanks in advance.
What output you are looking for?
Like that:
TB | DATE | VALUE | PREV DATE | VALUE PREV DATE |
1 | 01.01.2017 | 100 | ||
2 | 02.01.2017 | 200 | 01.01.2017 | 100 |
3 | 03.01.2017 | 300 | 02.01.2017 | |
4 | 04.01.2017 | 400 | 03.01.2017 | |
5 | 05.01.2017 | 500 | 04.01.2017 |
Only 100?
No value for other columns?
No It's not
I mean you want 100 for last column and 2nd Row only...
what about 3rd row, 4th row etc?
No value?
What is the logic behind the 100?
My falt. I need to get table like this:
TB | DATE | VALUE | PREV DATE | VALUE PREV DATE |
1 | 01.01.2017 | 100 | 02.01.2017 | 200 |
2 | 02.01.2017 | 200 | 03.01.2017 | 300 |
3 | 03.01.2017 | 300 | 04.01.2017 | 400 |
4 | 04.01.2017 | 400 | 05.01.2017 | 500 |
5 | 05.01.2017 | 500 |
Any ideas ?
Is this Previous Date or Next Date?
Your Date Format is DD.MM.YYYY or MM.DD.YYYY?
Previous Date like Date(MonthEnd(AddMonths(max(Date),-1)))).
Date format DD.MM.YYYY