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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Graphing Rangesum with conditions

Hi, I am trying to chart a rangesum function of my current daily sales compared to my previous year.

My function for the current day is:

RangeSum(Above(Total Count({<Date= {"$(=Max(Date))"}>}Sales), 0, RowNo()))

Chart:

Capture.PNG


It works perfect except it plateaus at the current time instead of ending. I was wondering if there is a way to graph it with conditions like "time is less than or equals to reloadtime()".  No matter what I do, it flattens at that time.


I'd prefer it if the blue line just ended when it reaches the most recent reloadtime


Thanks!

6 Replies
sunny_talwar

How about this?

If(Count({<Date= {"$(=Max(Date))"}>}Sales) <> 0, RangeSum(Above(Total Count({<Date= {"$(=Max(Date))"}>}Sales), 0, RowNo())))

Anonymous
Not applicable
Author

It sort of works. I don't want to ignore zeroes during the day. I just want to ignore them after the most recent reload time. I need that blue line to be a nice clean uninterrupted line

Capture.PNG

sunny_talwar

May be this then

If(TimeField < Frac(ReloadTime()), RangeSum(Above(Total Count({<Date= {"$(=Max(Date))"}>}Sales), 0, RowNo())))

sunny_talwar

Or

If(DateTimeField < ReloadTime(), RangeSum(Above(Total Count({<Date= {"$(=Max(Date))"}>}Sales), 0, RowNo())))

Anonymous
Not applicable
Author

Sorry for not being able to respond.

When I try this, qlikSense freezes up. I had to delete the chart completely and remake it

sunny_talwar

Would you be able to share you app to test?