Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am working in QlikSense trying have a continuous calculation comparing month to month of a value, based on the month dimension.
Here is a sample table, this table goes back 11 years.
Euro.Month and Year | Euro.Database Rate | % Difference vs. Last Month |
---|---|---|
June 2018 | 1.2250 | -3% |
May 2018 | 1.2600 | 4% |
April 2018 | 1.2150 | 1% |
Mar 2018 | 1.2000 | 2% |
I want to calculate what is in the % Difference vs. Last Month column, in QlikSense. The basic math is (CurrentMonth/Previous Month)-1
Here is the expression I have:
Sum({<[Euro.Month and Year.autoCalendar.Month]>}[Euro.Database Rate])/Sum({<[Euro.Month and Year.autoCalendar.Month]>-1}[Euro.Database Rate])-1
It is not returning any value. Any suggestions would be appreciated!
Thanks!
hi
assuming you'll keep the months sorted in descending order
you can use this formula
Sum[Euro.Database Rate])/below(Sum([Euro.Database Rate]))-1
may be Helpful
Sum[Euro.Database Rate])/Before(Sum([Euro.Database Rate]))-1...
Regards
PM
Or this if you would be making selection in 'Euro.Month and Year' field
Sum[Euro.Database Rate])/Below(Sum({<[Euro.Month and Year]>}[Euro.Database Rate]))-1