Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
natisham
Contributor II
Contributor II

Show 12 months when One month is selected

I have a chart trying to show the last 12 months beginning with the month I select. My current dimension is MonthYear.

My expression is sum({<MonthYear=>}[MACHINE HOURS])* avg({<MonthYear=>}[WORK PCT]/100)

I have it down to ignore the month year I select to show past months. But my chart keeps showing from Jun 2017 back to Feb 2016. How can I have the chart show all 12 months starting with my selected monthyear.

16 Replies
sunny_talwar

That is strange, would you be able to share a sample?

natisham
Contributor II
Contributor II
Author

I cant share the qvd due to privacy but I have added some screenshots. I need to have my other graphs remain as is. So i cant touch the master calendar to much. In the bar graph I use dimension Monthyear.graph.PNG

Then My expression is :

expression.PNG

And my Calendar:

Calender1.PNGCalender2.PNG

sunny_talwar

Can you post a screenshot of this expression in a text box object?

='>=' & Date(AddMonths(Max(MonthYear), -12), 'MMM YYYY') & '<=' & Date(Max(MonthYear), 'MMM YYYY')

natisham
Contributor II
Contributor II
Author

express.PNG

sunny_talwar

If this is what you see, I won't really know what you might be doing wrong because that proves to me that you should only see from May 2016 to May 2017 (assuming you have selected May 2017 or May 2017 is your max date.....

natisham
Contributor II
Contributor II
Author

Can you help with writing it into my expression:

sum({<MonthYear=>}[MACHINE HOURS])* avg({<MonthYear=>}[WORK PCT]/100)

sunny_talwar

That is what I was trying to do .... But I don't really know how your data is set