Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Limit the Number of Months Displayed in Table Chart

Hello -

I have a series of months which return in my dataset from SQL.  However in one of my table chart objects, I only need the most recent three months to be displayed.  I want to emphasize that I need the full range of months in my dataset because I need the full range to be avaible in other report objects within the dashboard.

Example -

My dataset includes months from the current month (February) going back to October.  In one of my table charts, I only need to display February, January and December.  I'm not seeing an easy way to do this and everything i've tried does not work. 

Can someone show me how to do this using an IF statement?

Thanks!!

3 Replies
Not applicable
Author

This is how I wrote mine.

If (ProgressItemDetails.PeriodStart >= '01/01/2012', ProgressItemsDetails.PeriodStart)

Just as an example.

I'm saying, if the field periodstart within the table progressitemdetails is greater than or equal to 01/01/2012, display the field periodstart from within progressitemdetails.

Hope this helps.

Not applicable
Author

Thanks for your reply.  I forgot to metion...this needs to be a rolling three months, so in other words, when we enter the month of March, I then need to go back three months from March.  Whatever the current month is, I need to always go back three months.

Anonymous
Not applicable
Author

Hi

http://community.qlik.com/message/192876#192876

In this link i gave solution as like your requirement

In there i gave solution for previous 5 month and after 5 month from the current month

I attached sample qv file there

From that qv file you just remove the after 5 month (in the expression i mention likn 5 in the monthend() function and keep it the variable as like that and front startmonth() you need provious 3 months know so you remove -5 and add -3)

Hope it will help for your requiremnt

Regards

Ashok