Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Afternoon,
I have a simple table with amount and recorddate fields. I've created a Month field (MonthStart) and Year field from the recorddate column. I am trying to graph the previous 6 months using the below set analysis. I searched the QlikView Community and found this expression.
Sum({Month={>=$(=max(Month)-6 <=$(=max(Month)'}>} amount
Using that set analysis I get all months <= the selection I make instead of just the previous 6. Any ideas on how to correct this?
Hi Zebediah,
Kindly use this expression....
sum({1<Date = {">=$(=MonthStart(Max(Date), -6))<=$(=MonthEnd(Max(Date)))"}>}Data).
Hope this will solve your issue.
Regards
Suresh Rawat
Are you using MonthStart as your graph dimension?
Hi Zebediah,
Kindly use this expression....
sum({1<Date = {">=$(=MonthStart(Max(Date), -6))<=$(=MonthEnd(Max(Date)))"}>}Data).
Hope this will solve your issue.
Regards
Suresh Rawat
Hi Zebediah,
Please Try this, Hope it will help you
= Sum({<Month = {">=$(=max(Month) - 6) <=$(=max(Month))"} >} Sales)
- Regards,
Vishal Waghole.
Thanks everyone for your help on this. Suresh provided the correct set analysis to solve the problem I had. I did make an edit to it to address a date formatting issue I was having in the report. What I ended up doing was this ->
sum({<Month = {">=$(=date(MonthStart(Max(Month),-6), 'MMMYY'))<=$(date(MonthEnd(Max(Month)),'MMMYY')))"}>}Data).