Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
amit_saini
Master III
Master III

Cumulative Sum Help!

Hi Folks,

I need to cumulative sum on bar chart , below is my expression:

=num(Money(sum(aggr(sum(fcur_PeakAnnualRevenue__c)/sum( distinct Rate), CurrencyIsoCode, Month))/1000000),'####')

I'm trying Something like below , but it's not working:

=aggr( rangesum(above( sum(fcur_PeakAnnualRevenue__c)/sum( distinct Rate), 0, rowno() )), CurrencyIsoCode, Month)

Thanks,

AS

1 Solution

Accepted Solutions
amit_saini
Master III
Master III
Author

Hi Sunny,

Thank You!

I already got solution to my problem.

This happens, when the second Dimension isn’t completely filled on each month. So with the AsOfTable concept which is explained very good under following link you can build up a nice solution which is easy to handle and give you much more flexibility.

https://community.qlik.com/docs/DOC-4252

Thanks,

AS

View solution in original post

23 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Check this.

Rangesum cumulative with 2 dimensions | Qlik Community

If doesnt help share your application.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
amit_saini
Master III
Master III
Author

Hi Solanki,

I tried this but it's not working:

=aggr( rangesum(above( sum(fcur_PeakAnnualRevenue__c)/sum( distinct Rate), 0, rowno() )), CurrencyIsoCode, Month)

Marked in bold are my 2 dim.

Thanks,

As

Kushal_Chawda

maybe try


rangesum(aggr(above(total sum(fcur_PeakAnnualRevenue__c)/sum( distinct Rate), 0, rowno(total)), CurrencyIsoCode, Month))

amit_saini
Master III
Master III
Author

Sorry Kush not working.

Attached is sample.

Thanks,

AS

Kushal_Chawda

try this

rangesum(above(total sum(aggr(sum(fcur_PeakAnnualRevenue__c)/sum( distinct Rate), CurrencyIsoCode, Month))/1000000,1,RowNo(TOTAL)))

amit_saini
Master III
Master III
Author

Sorry not working!

Thanks,

AS

sunny_talwar

What is the output you are expecting to see here? You have UP2GO_2F... and Month as your dimensions, but you aggregating on CurrencyIsoCode and Month? Can you provide what the output needs to look like in numerical terms

amit_saini
Master III
Master III
Author

Hi Sunny,

Current :

But Output should be like below Stage values on Bar

 

MonthStage
Jan$51.35
Feb$53.88
Mar$132.70
Apr$200.48
May$202.90
Jun$327.13
Jul$487.90
Aug$580.32
Sep$733.42
Oct$993.76
Nov$1,014.90
Dec$1,163.88

Thanks,

AS

amit_saini
Master III
Master III
Author

Sorry This is Current Senario:

And Output in above is comment is required.

Thanks,

AS