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

Announcements
Save an extra $150 Dec 1–7 with code CYBERWEEK - stackable with early bird savings: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
raajeshn
Partner - Creator
Partner - Creator

Issue with Set Analysis

Hi Experts,

I am running into an issue with respect to set analysis.

This is the scenario - I have a Sales Report where I am showing Sales (of a Product) with respect to  Dates (Dimension) - to be more specific 30 dates rolling from the selected date. One of the KPI is to show the Total Sales of the last 7 Days. Hence, my output will look like this (if 30-Jan-2012 is selected)

DateTotal SalesTotal Sales in Last 7 Days
01-Jan-2012

02-Jan-2012

....

....

30-Jan-2012

The total sales condition works well if it is just one date (as I am showing things at row level. If I write a set expression to include last 7 days, it again get distributed. Is there a way - I can evalute each of the expression inside the cell? Appreciate your help.

Thanks & Regards,

Raajesh N

4 Replies
Not applicable

The following will work but would give wrong answers to first 6 days

RangeSum(Above(Sales,0,6))

To arrive at the desired results irrespective of the selections you need to do it at script. If the values are from database (for eg. Oracle) you can use sum function with partition by clause.

Kiran.

CELAMBARASAN
Partner - Champion
Partner - Champion

Use your expression in dollar expansion like below

$(=Expression)

raajeshn
Partner - Creator
Partner - Creator
Author

Hi Kiran,

Thanks for the response. I tried your idea earlier and did not find it usefull. Can you please share an example on how to do this?

Thanks & Regards,

Raajesh N

raajeshn
Partner - Creator
Partner - Creator
Author

Hi Celambarasan,

Thanks for the response. However, I have already tried this and it does not work. Can you please attach an example of the working version.

Thanks & Regards,

Raajesh N