Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
helen_pip
Creator III
Creator III

Dimension to only display a portion of the dates

Dear Qlikview User

I have a dimension called MonthYear which contains a date for the last 2 rolling years

I.e. Apr-15 - Sep-16

However I only ever want the MonthYear to show the last 12 values

I.e. Oct-15 - Sep-16

However this must be rolling, so with the next data load the graph would show Nov-15-Oct-16

Can anyone help me achieve this, as the dimension limits show the First 12 values and not the last 12 values

Kind Regards

Helen

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Hopefully you created your MonthYear field as a date using the MonthStart function. If you haven't you should do that. When you have you can modify the chart expression(s) to make use of this. For example sum(Sales) would become sum({<MonthYear={">=$(=MonthStart(Max(MonthYear),-11))"}>}Sales).


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
stigchel
Partner - Master
Partner - Master

In the expression(s) you use, you can add the following set analysis

{<MonthYear={'>=$(=AddMonths(Max(MonthYear),-12))'}>}

Provided that the MonthYear field is a date field

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Hopefully you created your MonthYear field as a date using the MonthStart function. If you haven't you should do that. When you have you can modify the chart expression(s) to make use of this. For example sum(Sales) would become sum({<MonthYear={">=$(=MonthStart(Max(MonthYear),-11))"}>}Sales).


talk is cheap, supply exceeds demand
helen_pip
Creator III
Creator III
Author

Hello Gysbert

Thank you for your response

I appreciate your help

This works for me

helen_pip
Creator III
Creator III
Author

Hello Piet

Thanks for your response.  Your suggestion could work for me with a slight amendment

Kind regards

Helen