Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Monthly Overlap - Max Data Point

Hi All,

Sometime ago, I opened a discussion regarding getting a maximum data point on  a line/bar chart.

I created three expressions one as a normal bars, one as a line and another one as a line the difference was that the third expression was only to look at the maximum date. The code I used was


if(Date=Max( {$< LinkId = {'SAL'} >}
Total Date),sum({< [Sales Order Date] = {">=$(=MonthStart(Today(),Day(Today())=1))"}, LinkId = {'SAL'} >}
total [Sales Ordered Value]))

This works perfectly on day 1. For example on the 1st December it will report for all of November, however, out system refreshes at 2.00am. One of my colleagues enters data at 1,00am on the 1st December. Hence this data is pulled through and the max date now is the 1st December and not the 30th November. So I need to exclude the December records

Any idea how I can do this

Thanks in advance

Dave

16 Replies
sunny_talwar

Replace Today(1) with Today(1)-12 which will force the expression to think that today is 1st and see if it sum's the last month or not

If(Date = Max( {$< LinkId = {'SAL'} >}TOTAL Date),

Sum({<[Sales Order Date] = {">=$(=MonthStart(Today(1)-12, Day(Today(1)-12)=1))"}, LinkId = {'SAL'}>} TOTAL [Sales Ordered Value]))

Not applicable
Author

no joy the line see the image

sunny_talwar

What do you expect to see?

Not applicable
Author

the x axis should stop at 30/11/2016 and so should the line graph. The data point at 12/12/2016 should be at the 30/11/2016 and show £3,511,405

I can do a sample if you need to, can you tell me how

sunny_talwar

Sample would be really helpful here

Not applicable
Author

can you please tell how I can produce one?