Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
tyron_dougans
Partner - Contributor
Partner - Contributor

Rundown Line Chart - Accumulation Issue - RangeSum

Hi,

I currently have an issue with the Range Sum / Accumulation in QV when trying to use a line chart. I have attached an example to demonstrate. I am not sure how to get the accumulation to work as required.

In my Example, please note the following objects (Screenshot Below)

  • Table Box - Data Set - (Red) - Inline data loaded in script for test
  • Straight Table - (Green) - The line chart is following the straight tables logic on doing the rundown, which is incorrect. This has been highlighted in red
  • Un-Pivoted Table - (Blue) - This is to illustrate why the straight table is an issue and why the accumulation or range sum only works as needed when this table is pivoted. Result also highlighted in red
  • Pivot Table - (Blue) - This illustrates the outcome I need in table form and is correct. Result is highlighted in Green. But I need this to be applied to a graphic such as a line chart
  • Rundown Incorrect - (Line Chart) - This is the graphical version of what i need in the end, but unfortunately applies the straight table logic, which is incorrect
  • Rundown - (Text Object) - This is the end expected result

Capture.PNG

Thanks in advance

Regards

Tyron

1 Solution

Accepted Solutions
sunny_talwar

Try this

RangeSum(Sum(TOTAL <TreatyYear> Amount), -Aggr(RangeSum(Above(Sum(Amount), 1, RowNo())), TreatyYear, DateKey))

Capture.PNG

View solution in original post

2 Replies
sunny_talwar

Try this

RangeSum(Sum(TOTAL <TreatyYear> Amount), -Aggr(RangeSum(Above(Sum(Amount), 1, RowNo())), TreatyYear, DateKey))

Capture.PNG

tyron_dougans
Partner - Contributor
Partner - Contributor
Author

Thank you very much for your assistance Sunny.

The only issue I found is if you have any logic on your dimensions such as using as Left or Date# etc. and even add this to the expression, it breaks. But its a easy fix by just moving the formatting to script 🙂