Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Im trying to set up a report in Qlikview to present the results of the last 3 months. However I dont seem to get this working.
In another report where i'm presenting the last 6 weeks it works like this:
=sum( {$<Week = {$(=Max(Week)-5)}>} Revenues)
But when i replace week with month that doesnt work. Anyone got any idea's?
Thanks in advance.
Add this to your calendar:
IF(monthstart(TempDate) = monthstart(today(),-3),1,0) AS Previous3MonthIND,
Then in your set analysis add SUM({$<Previous3MonthIND = {'1'}>}Revenue)
Hi Guillermo,
Try this. Date should be a numeric date
sum({<Date={'>=max(Date)<=addmonths(max(Date),-5)'}>}Revenues)
Hope this helps.
Fernando
Add this to your calendar:
IF(monthstart(TempDate) = monthstart(today(),-3),1,0) AS Previous3MonthIND,
Then in your set analysis add SUM({$<Previous3MonthIND = {'1'}>}Revenue)
See if this blog can help you move in the right direction:
How about this?
Create one field like month(datefield) as Month,
=sum( {$<Month = {'$(=AddMonths(Month)',-3)}>} Revenues
Date field needs to be used, month won't work as its value is cyclic between 1-12, sometimes u may have situation like 1-3 = -2.
Thank you Nick Hoff, this is exactly what I needed.