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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis with Date vs Date - 364

Hi Experts,

I have scenario where I would like to compare the sale of a date with the least 364 days of the date ( for example this image).

But i want to add a dimension "date" to the chart. The aim is to compare sales day by day

Date
CategorySalesSales - 364
03/01/2013 Books050
03/01/2013Electronics & Computer250
03/01/2013Movies155
05/01/2012Books503
05/01/2012Clothing05
05/01/2012Movies512

I try with expression :

Sales = =sum({$<DATE={">=$(=min(DATE))<=$(=max(DATE))"},Année=,Mois=,Trimestre=,Jour=>}Montant)

and

Sales - 364 = sum({$<DATE={">=$(=date(min(DATE)-364))<=$(=date(max(DATE)-364))"},Année=,Mois=,Trimestre=,Jour=>}Montant)

But with that, Qlikview returns : chartwithdimensiondate.JPG

I think we should use the function aggr () but i'm not sure.

Any help is highly appreciated.

Thanks & Regards,

0 Replies