Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I would like to show in KPI the % change of the total number of products for current month vs. previous month. The point is, I have cumulative values. Please see below the example:
In this example, to get the percent change, I should calculate this: (189-139)/139=0,359, what give us 35,9%.
I am not sure how calculate it in Qlik? I know that for the last value, I can use formula: FirstSortedValue. But here comes the last value for the previous month.
I would be grateful for your help.
Best regards,
Rosemary
Instead of FirstSortedValue, you could use something like this:
(Only({$<Date={'$(=max({$<Date={">=$(=MonthStart(Today()))<=$(=MonthEnd(Today()))"}>} Date))'}>} [Total Number of Product]) -
Only({$<Date={'$(=max({$<Date={">=$(=MonthStart(AddMonths(Today(),-1)))<=$(=MonthEnd(AddMonths(Today(),-1)))"}>} Date))'}>} [Total Number of Product]) ) /
Only({$<Date={'$(=max({$<Date={">=$(=MonthStart(Today()))<=$(=MonthEnd(Today()))"}>} Date))'}>} [Total Number of Product])
This assumes that you have one date row per product.