Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
otherguy
Contributor
Contributor

Accumulative Line Graph Daily/Monthly Comparison

Hi All,

Similar to this graph in QlikView where I simply enable 'Full Accumulation' I am looking to accumulate Daily Sales for the last 6 months in Qlik Sense and I'm struggling a bit.

otherguy_0-1720450589806.png

Expression is 

 

sum({$<year=, month=,day=, yearmonthnum = {">$(=Date(Addmonths(Date#(max(yearmonthnum),'YYYYMM'),-6),'YYYYMM'))<=$(=Date(Addmonths(Date#(max(yearmonthnum),'YYYYMM'),0),'YYYYMM'))"}>}Sales)

 

Dimensions would be day and yearmonthnum

I've tried using Rangesum(above()) but I can't work out the aggregation on the correct level.

Any help would be appreciated.

Thanks

Labels (2)
1 Solution

Accepted Solutions
MatheusC
Specialist II
Specialist II

@otherguy 

Qlik Sense also contains the accumulation modifier alongside the expression, please confirm in your version.

MatheusC_0-1720463431053.png



- Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!

View solution in original post

3 Replies
chriscammers
Partner - Specialist
Partner - Specialist

Instead of using  the "yearmonthnum" as the operative modifier in Set Analysis I suggest you use a default formatted date field  so your Set analysis would look like this...

sum({$<year=, month=,day=, yearmonthnum =, thedetaildate =  {"$(='>' & Addmonths(max(thedetaildate),-6) & '<=' & Date(max(thedetaildate)))"}>}Sales)
// the expression should evaluate as follows if the mas date is today
//sum({$<year=, month=,day=, yearmonthnum =, thedetaildate =  {">1/8/2024<=7/8/2024"}>}Sales)
MatheusC
Specialist II
Specialist II

@otherguy 

Qlik Sense also contains the accumulation modifier alongside the expression, please confirm in your version.

MatheusC_0-1720463431053.png



- Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
otherguy
Contributor
Contributor
Author

Thanks Matheus, missed that.. Although, the accumulation doesn't seem to work with one measure and multiple dimensions, I had to create an expression for each month dating back with Day as the Dimension with the accumulation for each expression enabled.

Thank you