Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
nelson_sm
Contributor
Contributor

Prior Period Sum (Set Analysis)

Hi All,

Trying to do what I thought would be pretty straight forward but having no luck.

Hopefully putting this in front of some fresh eyes will get me where I want to be.

I have FullDate as my dimension and then two expressions.  First expression is a simple Sum(MetricValue) and the second is the same sum but for seven days prior.  Something like this:  Sum({<FullDate= {'$(=Date(FullDate-7),'MM/DD/YYYY'))'}>}MetricValue)

Unfortunately this is not working.

Trying to avoid using If statement as the data is extremely high volumes.  I cannot create it in the script as the number of days could vary.  Below is a table of expected results.

Thanks so much for any creative ideas that someone my have.

FullDateSumSum Prior 7

10/19/2018

940
10/18/2018789
10/17/201811420
10/16/201810111
10/15/2018248
10/14/201848
10/13/201834
10/12/201840
10/11/20189
10/10/201820
10/09/201811
10/08/20188
10/07/20188

10/06/2018

4
3 Replies
shreya_nadkarni
Partner - Creator
Partner - Creator

Hi,

You could try this

1st Exp:= sum(sum)

2nd Exp:= Below(Sum(sum),7)

BELOW.PNG

nelson_sm
Contributor
Contributor
Author

Excellent suggestion although I should have provide more detail.  I would only want to see the first seven lines.  When using dimension limits it's unable to reference.  I would be ideal to somehow utilizing set analysis.

shreya_nadkarni
Partner - Creator
Partner - Creator

Hi Steve,

For the above requirement you could Hide the second column in the presentation.

Also limit the max Number to 7 in the presentation for the 3rd column.

Hope this is helpful.Thanks

Top7.PNG