Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
keliane
Contributor III
Contributor III

Cumulative chart : Stop prediction

Hi all ! 

I'm displaying the Net Income in a cumulative way of the 3 last year on a graph chart. BUT it's giving me a prediction for the current year (as every month = 0) and I don't want it. I've find a way to make it work on a NON cumulative chart with this expression : 

If(
Sum({<Year={2024}>} [Net Income]) = 0 , null() ,

Sum({<Year={2024}>} [Net Income] ))

But it's not working on the cumulative one. My dimension is [Date.autoCalendar.Month]


thanks for your help guys !

Screenshot 2024-08-21 173743.png

Labels (5)
1 Solution

Accepted Solutions
keliane
Contributor III
Contributor III
Author

Hi @MatheusC , thanks for your answer !
Your solution is almost working but cut the line just after the first month with no data.
You were right, the problem was coming from the Modifier. Here is the expression that finally work for me : 

If(
RangeSum(Above( Sum({<Year={2024}>} [Net Income]), 0, RowNo())) =
RangeSum(Above( Sum({<Year={2024}>} [Net Income]), 1, RowNo())),
null(),
RangeSum(Above( Sum({<Year={2024}>} [Net Income]), 0, RowNo()))
)

Thanks again !

 

View solution in original post

2 Replies
MatheusC
Specialist II
Specialist II

@keliane 
By inserting the accumulation through expression and not by the Modifier, this should work:

if([Date.autoCalendar.Month] <= Month(today()),RangeSum(Above(Sum({<Year={2024}>} [Net Income]), 0, RowNo())), null() )

After inserting the expression, in the Presentation tab, set it to "Show as connections".

MatheusC_0-1724356803470.png



- Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
keliane
Contributor III
Contributor III
Author

Hi @MatheusC , thanks for your answer !
Your solution is almost working but cut the line just after the first month with no data.
You were right, the problem was coming from the Modifier. Here is the expression that finally work for me : 

If(
RangeSum(Above( Sum({<Year={2024}>} [Net Income]), 0, RowNo())) =
RangeSum(Above( Sum({<Year={2024}>} [Net Income]), 1, RowNo())),
null(),
RangeSum(Above( Sum({<Year={2024}>} [Net Income]), 0, RowNo()))
)

Thanks again !