Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Restrict Month

Hi Experts,

I have a Month field which is from Jan 2015 till Aug 2015

I need to add this dimension into a pivot table.

But I need to restrict it to 3 months. i.e., i need only June 2015 to Aug 2015 to be added to the Month field in the table not in the script.

     Actual                                 Requirement

Actual.JPG         Requirement.JPG

how can i do this.

Please provide me suggestions.

1 Solution

Accepted Solutions
gautik92
Specialist III
Specialist III

Hi PRRAJENDRAN ,

try this

in sort tab use load order reversed and in dimension limit tab show only first 3 values

View solution in original post

3 Replies
jduarte12
Partner - Creator II
Partner - Creator II

Hi,

In the dimension limits tab, try to impose onle the max 3 months.

Regards

Kushal_Chawda

Create MonthName field in Script using

monthname(date#(Month,'MMM YYYY')) as MonthName

Create the Pivot Table

Dimension:

MonthName


Expression:

Sum({<MonthName={">=$(=addmonths(max(MonthName),-2))<=$(=addmonths(max(MonthName),0))"}>}Sales)


You can modify your expression as per your logic

gautik92
Specialist III
Specialist III

Hi PRRAJENDRAN ,

try this

in sort tab use load order reversed and in dimension limit tab show only first 3 values