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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Chart Dimension Last 3 months

Hi All...this may be too simple but I'm totally stuck....

I have 3 data fields - Month, Year, Dollar Value....

I'm trying to create a bar chart...that lists out the Dollar value for the last 3 months (from the maximum possible Month and Year combination)....

In the chart dimension I used the following code to filter out the months but it doesn't seem to work. Any quick ideas please?


If(Addmonths(MakeDate(max([Year]),max([Month])),-3) >=MakeDate([Year],[Month]),Month(MakeDate([Year],[Month])))


Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Hi,

  1. Create a calculated field

    makedate(year,month)


  2. Sort your dimesions according numeric value from sort tab.

  3. Go to presentation tab and check the max visibible number option and then enter 3 .

You can also look at the sample.

Best Regars.

View solution in original post

2 Replies
Not applicable
Author

Hi,

  1. Create a calculated field

    makedate(year,month)


  2. Sort your dimesions according numeric value from sort tab.

  3. Go to presentation tab and check the max visibible number option and then enter 3 .

You can also look at the sample.

Best Regars.

Not applicable
Author

Thanks very much, Önder....This is exactly what I was looking for...Thank you....