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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
geof
Contributor II
Contributor II

Line chart - Discontinue line when no more values to accumulate

Hi

I have a line chart that graphs the accumulated (running sum) of daily sales. I have used this expression which I found in this community (thanks):  

Sum(Aggr(RangeSum(Above(Sum(this_year_daily_total), 0, RowNo())) , day))

I would like the line to end when there are no more values to accumulate, i.e. when the chart reaches the 'current' day. I guess I would need to use the Below() function but I am not sure how to evaluate till the end of the month. Also is it possible to stop the line being drawn?

In the attached image, the arrows points to where I would like the line to stop.

The data contain rows:

Month, Day, Product, ValueSold

The values for all products are summed for each day and accumulated for each day and each month.

 

 

Labels (4)
1 Solution

Accepted Solutions
Aasir
Creator III
Creator III

if(day <= day(today()), Sum(Aggr(RangeSum(Above(Sum(this_year_daily_total), 0, RowNo())), day)), null())

View solution in original post

2 Replies
Aasir
Creator III
Creator III

if(day <= day(today()), Sum(Aggr(RangeSum(Above(Sum(this_year_daily_total), 0, RowNo())), day)), null())

geof
Contributor II
Contributor II
Author

Very nice! The solution is exactly what I wanted. Thank you.