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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Sazabi
Creator
Creator

Aggregate Measure Expression by class() When Dealing with Rangesum() Across 2 Dimensions in a Chart

Hello Qlik Friends!!

I am looking to do a date overlay of cumulative  totals. (one line of cumulative  totals per day on a line chart).

My 1st dimension: a calculated dimension using the class() function.

My 2nd dimension:  a date timestamp field.

My measure: rangesum(above(Count(field),0,rowno()))

Without the 2nd dimension, the linechart is fine as a summary, but once that 2nd dimension is put in, it does not calculate correctly. It seems the numbers aren't being accumulated by rangesum()..

Briefly scanning across the community, according to some other threads (like https://community.qlik.com/t5/Qlik-Sense-App-Development/RangeSum-with-2-Dimensions/m-p/15716#M1100 and https://community.qlik.com/t5/Qlik-Sense-App-Development/Rangesum-Above-with-Multiple-Dimensions/m-p...), I am supposed to aggr() my measure by the 2 dimensions.

Therefore my new measure should look like :

aggr(rangesum(above(Count(field),0,rowno())),class(),timestampfield)

 

However, they are turning my values null for me.

I wouldn't want to use TOTAL in this case either as I am looking for the cumulative sum by dates.

Are we able to aggr() by a class() function? 

 

Thank you very much

 

L

 

 

 

10 Replies
sunny_talwar

Would you be able to share a qvf file to show what you did? Like a sample file