Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calendar issue: Last 12 months

Hello Everyone,

I want to display the data for last 12 or say last 24 months from current date(say today). How do i do this in qlik sense using set analysis or something?

1 Solution

Accepted Solutions
Not applicable
Author

Use set analysis like this:

count({<[Date_field]={">=$(=addmonths(monthend(max([Date_field])),-12)) <=$(=max([Date_field]))"}>} Value)


Change Date_field fand Value for your date/value field.

View solution in original post

5 Replies
Gysbert_Wassenaar

Where do you want to display this data in? A Filter pane or a chart? Can you post a small Qlik Sense app that demonstrates the problem?


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

I want to display a chart of last 12 months

Not applicable
Author

Use set analysis like this:

count({<[Date_field]={">=$(=addmonths(monthend(max([Date_field])),-12)) <=$(=max([Date_field]))"}>} Value)


Change Date_field fand Value for your date/value field.

Anonymous
Not applicable
Author

Thank you!! I was using pretty much the same code but was doing a silly mistake. It Works now.

Cheers!!

Not applicable
Author

You're welcome! Please, mark the answer as correct so other people can use this too