Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
ugurarslan
Creator
Creator

cumulative table with sum cash applied versus total invoiced$ per month

Dear all,

I have table with the following dimension and measurement:

Dimension:

day([Month date])

Measurement:

(Sum({<[Year Month]={'$(Current_Month_YYYYMM)'}>}[Cash App Amt USD])

/

Sum({<[Year Month]={'$(Current_Month_YYYYMM)'},[Trans Type]={'invoice'}>}total <[Year Month]>[Trans Amt USD]))

Table now shows:

Days is created by using dimension Day([month date])

Measurement by using:

(Sum({<[Year Month]={'$(Current_Month_YYYYMM)'}>}[Cash App Amt USD])

/

Sum({<[Year Month]={'$(Current_Month_YYYYMM)'},[Trans Type]={'invoice'}>}total <[Year Month]>[Trans Amt USD]))

DaysMeasurement
16
23
35
46
58
68
74
83
96
107
118
128
138
148
159
169
176
184
193
202

Now I want to see this result as cumulative.

DayCumulative
16
29
314
420
528
636
740
843
949
1056
1164
1272
1380
1488
1597
16106
17112
18116
19119
20121

How do I need to do this?

Please help me.

Ugur

7 Replies
dplr-rn
Partner - Master III
Partner - Master III

Try range sum with above e.g.

rangesum(above(Sum(LineSalesAmount),0,RowNo()))

justinphamvn
Creator II
Creator II

Hi Ugur,

You can try this:

1. Create a variable v_Measurement

(Sum({<[Year Month]={'$(Current_Month_YYYYMM)'}>}[Cash App Amt USD])

/

Sum({<[Year Month]={'$(Current_Month_YYYYMM)'},[Trans Type]={'invoice'}>}total <[Year Month]>[Trans Amt USD]))

2. Using the RANGESUM function in combination with the ABOVE function to accumulate the values you need.

Create Measure Accumulate:

rangesum( above( $(v_Measurement),0,rowno()))


3. Create Bar Chart or Table with

Dimension: day([Month date])

Measure: Accumulate


Hope this helps,

Justin.

ugurarslan
Creator
Creator
Author

Dear Justin,

Thank you very much for your reply, appreciate it. Unfortunately the outcome is '-'.

Can you please write the exact formula with using my example?

Thanks

Ugur

ugurarslan
Creator
Creator
Author

Dear Dilip.

Thank you very much for your answer,

Would it possible for you to write the formula with using my example?

Thanks

Ugur

justinphamvn
Creator II
Creator II

Hi Ugur,

Pls try this:

rangesum( above( (Sum({<[Year Month]={'$(Current_Month_YYYYMM)'}>}[Cash App Amt USD])

/

Sum({<[Year Month]={'$(Current_Month_YYYYMM)'},[Trans Type]={'invoice'}>}total <[Year Month]>[Trans Amt USD]))

,0,rowno()))

I think If your current Measure is working so the Measure Accumulate is working too

p/s: The Measure Accumulate like this: rangesum( above( sum([Expression]),0,rowno()))

Thanks,

Justin.

dplr-rn
Partner - Master III
Partner - Master III

just replace the sum function by yours

rangesum(above(

(Sum({<[Year Month]={'$(Current_Month_YYYYMM)'}>}[Cash App Amt USD])

/

Sum({<[Year Month]={'$(Current_Month_YYYYMM)'},[Trans Type]={'invoice'}>}total <[Year Month]>[Trans Amt USD]))

, 0,RowNo() ) )

agigliotti
Partner - Champion
Partner - Champion

Let's try replacing RowNo() with RowNo(TOTAL).


I hope it helps.