Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

kidbank3
Contributor III

Accumulation Error

Can someone tell me why the data in my line chart does not match the data in my table?

The dimensions and expressions are exactly the same.

Thanks,

Mike

1 Solution

Accepted Solutions

Re: Accumulation Error

Try this:

Aggr(RangeSum(Above(SUM(count), 0, RowNo())), ([[Result Month]]], (NUMERIC)), ([Day of Month],(NUMERIC)))

Capture.PNG

9 Replies

Re: Accumulation Error

How about this:

RangeSum(Above(TOTAL SUM(count), 0, RowNo(TOTAL)))


Capture.PNG



kidbank3
Contributor III

Re: Accumulation Error

Sunny,

Sorry, I gave you too simple of an example so this expression doesn't quite return what I need.

I have multiple months in my real data set.

Can you look at this new QVF and plot the values in the "My Values" table column to the line chart?

Re: Accumulation Error

I think what you want to do is not possible with two dimensions. Why not use a concatenated dimension:

=[Day of Month] & Chr(10) & [[Result Month]]]

Expression:

RangeSum(Above(SUM(count), 0, RowNo()))

Capture.PNG

kidbank3
Contributor III

Re: Accumulation Error

I need a month to month comparison so the concatenated dimension won't achieve what I need.

Thanks for looking it over!

Mike

Re: Accumulation Error

Why did you close this discussion then?

What is the expected output? May be provide an Excel of expected output

kidbank3
Contributor III

Re: Accumulation Error

Sorry, I thought you said it wasn't possible. 

My desired output is two lines, one for each month, accumulating over the days of the month.  

So the April line should accumulate from 32...859 and May should accumulate from 42..1109

Re: Accumulation Error

Try this:

Aggr(RangeSum(Above(SUM(count), 0, RowNo())), ([[Result Month]]], (NUMERIC)), ([Day of Month],(NUMERIC)))

Capture.PNG

kidbank3
Contributor III

Re: Accumulation Error

That was it Sunny.  It's working now.  It's strange to me that it needs that last aggr function. 

I went down this rabbit hole due to another post: Comparison Graph

I have this need as well so i wanted to pursue a solution.  If you want to correct my post for Comparison Graph, please do so, otherwise I'll make a correction to it in a little while.

Mike

Re: Accumulation Error

I am out so won't be able to offer any help. But the reasons for both the dimension in the Aggr is due to the fact that both the Months have same days... 1, 2, 3, 4.... If you have unique field for each month... Then you might not need the two fields....

Community Browser