Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a Excel source with the time Dims with other Measures and calc Fields as below;
I want to dertermine the Latest and Previous Month and Latest and Previous Quarter calculation on a Chart.
Any help appreciated !
Thanks !
try tis
Current Month
=num(sum({$} Measure), '$#,##0;($#,##0)')
Previous Month
sum({$<Year = {$(=only(Year) - $(=if(only(Month) = 1, 1, 0)))}, Month = {$(=month(addmonths(MonthYear, -1)))}>} Measure)
current QTR
=num(sum({$<Year = {$(=only(Year))}, Quarter = {$(=only(Quarter))}, Month = {"<=$(=max(Month))"}>} Measure), '$#,##0;($#,##0)')
Personally I would flag the data in the script and use that in my set analysis statement o simplify things. A sample qvw would be helpful in order to explain it.
Best,
S