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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Sa_Rah
Contributor III
Contributor III

line chart and data points plotted using variable date v using max(date)

Hi

I'm puzzled by the below and need some help.

If I use the following expression the associated line graph plots a data point for every month, irrespective of whether the cumulative value I'm calculating changes. The variable vUnderwayDate = '27/03/23' i.e. a fixed date in the past.

Expression 1:

if( MonthYearDate <= monthstart($(vUnderwayDate)) ,

aggr(rangesum(

above( Count( distinct {<Table = {"SIP"}, Attended? = {"Attended","Booked","In Progress"}>} ENo)

+0*Count(distinct {$+1<MonthYearDate ={">=$(=Min(MonthYearDate ))<=$(=Max(MonthYearDate ))"}>}ENo),

0,rowno()))

,MonthYearDate ))

Graph 1:

Sa_Rah_1-1695040311195.png

 

However if I amend the first line as follows and replace the variable with a max(date) formula, it only plots data points where the cumulative value changed:

Expression 2:

if( MonthYearDate <= monthstart(max({<Attended? = {"Attended"}>}Date) ),

aggr(rangesum(

above( Count( distinct {<Table = {"SIP"}, Attended? = {"Attended","Booked","In Progress"}>} ENo)

+0*Count(distinct {$+1<MonthYearDate ={">=$(=Min(MonthYearDate ))<=$(=Max(MonthYearDate ))"}>}ENo),

0,rowno())),

MonthYearDate ))

Graph 2:

Sa_Rah_0-1695040276720.png

 

Can someone help me to amend Expression 2 so that it plots data points for each month, irrespective of whether the cumulative value changes?

Thanks

Sarah

Labels (1)
0 Replies