Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to create a calculated dimension where the last Year Month of sales is a calculated dimension - by Customer. Like below.
DATA: | ||
Customer | Sale Year Month | Amount |
A | 201501 | 100 |
A | 201502 | 200 |
A | 201504 | 300 |
A | 201506 | 400 |
A | 201507 | 500 |
A | 201508 | 0 |
B | 201408 | 50 |
B | 201410 | 100 |
B | 201412 | 0 |
B | 201501 | 100 |
RESULT of LAST MONTH WITH SALES: | ||
Customer | Sale Year Month | Amount |
A | 201507 | 500 |
B | 201501 | 100 |
Thanks in advance,
Zag
Try this:
Dimension: Customer
Expressions:
1) FirstSortedValue([Sale Year Month], -[Sale Year Month])
2) FirstSortedValue(Amount, -[Sale Year Month])
1) FirstSortedValue({<Amount = {'<>0'}>} [Sale Year Month], -[Sale Year Month])
2) FirstSortedValue({<Amount = {'<>0'}>} Amount, -[Sale Year Month])
Thanks Sunny for the feedback - unfortunately that didn't work. Got nothing to come back.
Made some modifications above. Please check again.
Best,
Sunny
thanks for the feedback - wasn't able to get it to work for my issue - but I did use this function in another area. Thanks!