Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
ba11
Contributor III
Contributor III

Cumulative Total

Hello Everyone,

I want to create a chart that compares the sales target value and the actual sales value over time.

For my target I used this expression:

RangeSum(Above(Sum({<[DAILY_HISTORY.BOOK_DATE]*={"<=$(=max(total Detatched_Calendar.Date))"}>}TARGET_SUMMARY.ORDERS_IN_TARGET), 0, RowNo()))
/
Count({<[DAILY_HISTORY.BOOK_DATE]*={"<=$(=max(total Detatched_Calendar.Date))"}>} Detatched_Calendar.Date)

Because the value is only by period and I want it to spread and accumulate daily.

For my sales value:

RangeSum(Above(Sum({<[DAILY_HISTORY.BOOK_DATE]*={"<=$(=max(total Detatched_Calendar.Date))"}>}[DAILY_HISTORY.DAILY_MOVEMENT]), 0, RowNo()))

I used the Detatched_Calendar.Date field as the line.

Not sure if these are correct but its returning values that are way higher than the expected numbers and I don't know why this is.

Any help and ideas will be greatly appreciated.

thank you.

Labels (3)
1 Reply
F_B
Creator III
Creator III

Hi @ba11 ,

there are a few things you could try to check, like if the aggregation functions sum and count are applied correctly, since it seems like you're summing the values based on certain conditions. Also, rowno function may not be necessary, depending on your data structure.