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: 
PM_QlikDev
Contributor III
Contributor III

Line graph to show dynamic date comparison

Hi All,

I have a requirement to show daily hourly order counts for dynamic date comparison.

By Default the chart should show data for latest Order Date,previous and a weekbefore,and when the user then selects any OrderDate from filter,then the chart should get updated for current selection date (CSD),CSD-1 and CSD-7 in a line graph with separate line for each measure.

For eg. Suppose Latest Order Date in a dataset is 27/12/2019 ,when a user opens the report he should see line graph showing 3 separate lines for 27/12/2019,26/12/2019,20/12/2019., and when he selects any date suppose 11/01/2019 then the chart should be updated to counts for 11/01/2019,10/01/2019,04/01/2019.

I have managed to fetch the count for max or current selected date using exp and not fetching data for -1 and -7 dates:

count({$<Order_Date={"$(=Date(Max($(v_Order_Date))))"}>} distinct OrderId)

where v_Order_Date= Date(floor(record_date),'DD/MM/YYYY') -----in order to fetch unique records for dates

I have tried everything from my end.Any sort of help on this would be highly appreciated.

PFA the expected line graph.

 

 

1 Reply
Brett_Bleess
Former Employee
Former Employee

Try the following Design Blog post:

https://community.qlik.com/t5/Qlik-Design-Blog/Dates-in-Set-Analysis/ba-p/1472511

If you need to search further in this area, use the following link:

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.