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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Limit number of columns

Hi,

I have a variable MonthYear, structured like this: oct-2011, in a dimension, showing the number of sales per month. In a sales table (either straight or pivot) I want to show the sales for the previous 13 months.

How can I limit the number of columns shown in this table?

Thanks!

3 Replies
Not applicable
Author

Hi,

In the back end script create a flag if the date falls within 13 months period, then in the table (pivot or straight) you can write the expression like this:

sum(if(Flag=1,Amount))

Hope this helps you.

Cheers.

Not applicable
Author

Hi,

How do I write that script for the flag?

thanks!

Not applicable
Author

Hi,

Please find the attached sample may help you.

Cheers.