Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mgranillo
Specialist
Specialist

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
sunny_talwar

Try this:

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

Capture.PNG

View solution in original post

9 Replies
sunny_talwar

How about this:

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


Capture.PNG



mgranillo
Specialist
Specialist
Author

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?

sunny_talwar

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

mgranillo
Specialist
Specialist
Author

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

Thanks for looking it over!

Mike

sunny_talwar

Why did you close this discussion then?

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

mgranillo
Specialist
Specialist
Author

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

sunny_talwar

Try this:

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

Capture.PNG

mgranillo
Specialist
Specialist
Author

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

sunny_talwar

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....