Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rolling 3 months in chart

I have created the below chart with below information:-

Dimension : Claim_Month

Expression: count({<CLAIM_DATE={'>$(=AddMonths(Max(CLAIM_DATE),-3))'}>} Distinct CLAIM_ID)

This chart is showing me the max of month and previous two months always.

I wanted to show, If I select any month from top, then the chart should show, the selected month and previous 2 month in the chart.

Suppose, if I am selecting April from top list box, then my chart dimension should show Apr, Mar, Feb.

How can I do this? Please help me at the earliest.

8 Replies
sunny_talwar

Can you try it with this expression:

Count({<CLAIM_DATE={'>$(=AddMonths(Max(CLAIM_DATE),-3))'}, MonthField = >} Distinct CLAIM_ID)

arulsettu
Master III
Master III

try this

count({<CLAIM_DATE={'>$(=AddMonths(Max(CLAIM_DATE),-3))<=$(=max(CLAIM_DATE))'}>} Distinct CLAIM_ID)

Not applicable
Author

Hi Sunny, Thankyou for ur assistance. But this is not giving me the right month sets. Please help

Not applicable
Author

Hi Settu,

Your solution is not giving me the right month sets. When I select any month from Claim_Month, then my chart dimension should show the selected month and previous two months. Please help.

arulsettu
Master III
Master III

can you post you app

sunny_talwar

Would you be able to elaborate so to what you are getting and what do you expect to see?

agomes1971
Specialist II
Specialist II

saimahasan
Partner - Creator III
Partner - Creator III

use this expression:

count({<CLAIM_DATE={'>$(=max(CLAIM_DATE)-3)<=$(=max(CLAIM_DATE))'}>} Distinct CLAIM_ID)