Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I check the posts on the Current Month but my problem is different.
The Current Month needs to be set using the CurrentMonthFlag which is set in the database.
Values which are required for reporting are:
CurrentMonth, Previous Month and Next Month.
I could get a CurrentMonth using the flag.
The problem is how do I get the previous Month. Can i create a nested query like a Nested SQL in QlikView ?
We have MonthID which is in a numeric format which can be used to do +1 or -1 for next or previous month.
Also how would we identify next month for the selected month.
Please Suggest.
hi,
You can achieve the above using set analysis. Create a num month
eg : load num(Month) as Monthnum from table.
output would be 01,02,03
Now in Expression. use
Sum({<Monthnum={$(=num(Month(today())))}>} Amount)
I hope this helps
Will try this solution but the only problem here is the calender is not the normal calender so I cant use Today() the value has to be from the database based on the flag
hi,
If it is from data based then you can use max(Month). If you can add a sample file then it would be easy to provide a solution
Hi Deepak,
How would we get the Prev of Current Month.
And if a selection is done pervious of that.
Sample Data Below:
MonthID | Month | Current Month Flag |
111 | Jan FY2011 | N |
112 | Feb FY2011 | N |
113 | Mar FY2011 | Y |
114 | Apr FY2011 | N |
Regards,
Chinmay
hi,
PFA
Hi Deepak,
Really appreciate your quick response, I am kind of new with the Set Analysis and finding it difficult to understand how i would use this in charts.
I was trying to save the CurrentMonth, Previous Month into a variable which I would be able to Use in the charts.
Regards,
Chinmay
Any way which you feel comfortable you can work around.
But set analysis reduces the pressure on the chart as compare to if statement.
You will lots of forum on Set analysis, read it will be very useful