Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

alekong1
New Contributor

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

Re: 6 Month Trend Line Chart Help

What is your Date field format?

cchristenson2
New Contributor II

Re: 6 Month Trend Line Chart Help

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
Esteemed Contributor

Re: 6 Month Trend Line Chart Help

Try to replace the simple quotes by double quotes

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

Community Browser