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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Need Help

Hello All,

I am facing a problem in achieving the format attached below.

I want to show Last 3 months, Last 6 months and Last 12 months data along with all months data.

I know , we can concatenate 3 months , 6 months and 12 months data with original one which will give me the results.

But I dont want it , as the data size is very huge which will increase the data at huge extent.

I there any other way out.

Even writing all expressions for every month is my last option.

sample output.PNG.png

1 Reply
Not applicable
Author

Hello

You can create set analysis expressions for last 3, 6 and 12 months like below:

variables:

vMaxSelectedCalendarDate=MonthStart(max(Trade.Date))

vLastThreeMonths = =addmonths(vMaxSelectedCalendarDate,-3)

expression for last 3 months:

count({<[Trade.Date] = {">=$(vLastThreeMonths)<$(vMaxSelectedCalendarDate)"},[Trade Month]=,[Trade Year]=,[Trade Quarter]=>}itemid)

Trade.Date is the calendar date.

Thanks,

Angad