Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Combo chart with cumulative

Hi all. Hopefully this is pretty straight forward.

So here is the script I have for my app:

SELECT

True_Churn, Retention_Target, Date_Measure, Closing_Base, Opening_Base,

(Closing_Base - Opening_Base) as Flow

from xxxxx

And here is my data table:

Opening_BaseClosing_BaseTrue_ChurnRetention_TargetDate_Measure
4033540838788.50%01-01-18
408384421954985.90%01-02-18

Each month I'm going to update the table with the previous month's data.

I want to product a combo bar/line graph showing each month's Flow number as the bars, with the cumulative month on month Flow as the line.

The basics are pretty, well, basic:

  • Dimension = month(Date_Measure)
  • First measure for the bars = sum(Flow)

But how do I add a cumulative line graph to it please?

I have tried

if(Sum(if(year(Date_Measure)=2018, Flow,0))>0,  rangesum( above( sum(if(year(Date_Measure) = 2018,Flow,0)),0,rowno())), null)


But it's returning a figure for Feb of 27,188 (no idea how it's got that) not the expected 3,884.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi - sorted. I had made it far too complicated. Just a straight

Rangesum(above(sum(Flow),0,RowNo()))

Has done it.

View solution in original post

3 Replies
YoussefBelloum
Champion
Champion

Hi,

can you attach some data ? 12 lines with 2 columns: Flow and Date_measure

Anonymous
Not applicable
Author

Hi Youssef

As attached - it's my actual data. Thanks!

Anonymous
Not applicable
Author

Hi - sorted. I had made it far too complicated. Just a straight

Rangesum(above(sum(Flow),0,RowNo()))

Has done it.