Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

6 Month Trend Line Chart Help

Hi all,

I am using Qlik Sense and trying to create a 6 month dynamic line chart.

Right now my dimension is:


=date#(Month_Sort)

Month_Sort displays the date as 'YYYY-MMM'.

My measure is:

count({1<Date={'>=$(=AddMonths(Max(Date),-5)) <=$(=(Max(Date)))'}>}[Review Due Date])

The line chart shows all the data and not the most recent 6 months.

Can anyone help me with my issues?

Thanks,

Ale

3 Replies
sunny_talwar

What is your Date field format?

cchristenson2
Contributor III
Contributor III

Hi Ale,

I would recommend building a master calendar and creating a flag for the past 6 months. Then you can opt to ignore selections made in the application, such as other date fields and your chart is not impacted.

The chart would update for selections made in other fields such as departments, people, whatever is in your data. Maximizes your flexibility. 

If this is of interest I'd be happy to share some code from a master calendar.

OmarBenSalem

Try to replace the simple quotes by double quotes

count({1<Date={">=$(=AddMonths(Max(Date),-5)) <=$(=(Max(Date)))"}>}[Review Due Date])