Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
aniruddhyadutta
Creator
Creator

Cumulative sum expression is working erracticly

Hi all,

I am facing some issues while calculating the cumulative sum

when I am using this expression my chart is showing correct data

RangeSum(Above(Sum({$< Hour_15={'$(v2)','$(v3)','$(v4)'}>} ALERT_Count),0,RowNo()))

cum.PNG

but this same expression if I use with an if else condtion is not behaviung correctly

If (SELECTOR = 'CUM',RangeSum(above(sum({$< Hour_15={'$(v2)','$(v3)','$(v4)'}>} ALERT_Count),0,RowNo())), sum({<Hour_15= {'$(v2)','$(v3)','$(v4)'}>}ALERT_Count))

wrong cum.PNG

here you can see the cumulative has been done from 11:00 and 11:15.

I am using the if -else to use the expression in a toggle expression.

3 Replies
marcus_sommer
MVP & Luminary
MVP & Luminary

Try it with:

RangeSum(Above(Sum({$< Hour_15={'$(v2)','$(v3)','$(v4)'}, SELECTOR = {'CUM'}>} ALERT_Count),0,RowNo()))

- Marcus

aniruddhyadutta
Creator
Creator
Author

Hi Marcus,

it worked for 'CUM'

but this is I believe has become hard coded for only "Cum'.Is there any way to make this expression dynamic i.e if we select 'Non-Cum' as a selector value to show in the same expression?

Thanks,

Aniruddhya

marcus_sommer
MVP & Luminary
MVP & Luminary

Try it with:

RangeSum(Above(Sum({$< Hour_15={'$(v2)','$(v3)','$(v4)'}, SELECTOR = p(SELECTOR)}>} ALERT_Count),0,RowNo()))

- Marcus