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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
shashanksood2588
Partner - Contributor
Partner - Contributor

Line Chart - Previous week expression

Hi,

I am trying to write a set expression for comparing the Current Trend with the value Previous Week.

For example, on the 21-03-2020, I want to display the value on  14-03-2020 and so on for each date and each time. 

My first expression is :

sum({$<[CG Metrics Metric]={'CGIn'}>}[CG Metrics Metric Value]) / 1000000000

Last Week Expression:

sum({$<[CG Metrics Metric]={'CGIn'}, [CG Metrics Timestamp]={'$(=date(Max([CG Metrics Timestamp])-7, 'DD/MM/YYYY hh:mm TT'))'} >} [CG Metrics Metric Value]) / 1000000000

This expression only creates one data point as shown in the attached. However I want to compare the values for each time and date.

TIA.

0 Replies