Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone!
I am pretty new to the QlikView and I would like to know if someone can assist (or explain) to me how to display a graph for the last 12 months based on a selected period , in this case if will be the Quarter and the Year. So for example, if the user selected 2017 and select 1st Quarter, it will display (sum of the value) the last 24 months on the graph. Below is a mock up of what I am trying to accomplish.
Below is what I have so far.
Any help will be appreciated. Thank you all!!!!
May be use this? Change as per your Fields
Sum({$<Month=, Year=, Quarter, Date={">=$(=MonthStart(AddMonths(Max(DateID),-24)))<$(=MonthEnd(Max(DateID)))"}>} value)
Hi,
Try like this,
Sum({$<Year=, Quarter, DateID={">=$(=(AddMonths(Max(DateID),-24)))"}, DateID={"<=$(=(Max(DateID)))"}>} Value)
Hi Ray,
Please find the solution attached.
Regards,
Anagha
Thank you so much!!
One question, can you explain to me how and where are the variables vStartDate and vEndDate being set. Is it being set every time the user make a selection (year or/and quarter)? Your solution is very good and I would like to learn how it is being set.
Thank you again!!!
Regards
Ray
You can set Script Level or Variable Overview (Ctrl + Alt + v). And then set. It's up to you how you want to select if you want to change of vStart and vEnd of the selection yes we can set those too
I am assume you may got answer from above. So go and close the Thread by flag "Correct Answer"
Hi Ray,
The variables need to be created using variable overview (Ctrl+Alt+v) and their values refer to "DateID" column. Since the "DateID" column value changes with the selection in "Year" and "Quarter" column so will the value in the variables.
Hope this answers your question.