Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
azertyh
Contributor II
Contributor II

last 60 days and accumulated from begining

hello,

i find the right expression from @sunny_talwar in this topic.

in my case, it's :

=If(Count(DISTINCT {<Date_journal={"$(='>=' & Date(Max(Date_journal)-60))"}>} Montant)>0,RangeSum(Above(Sum(Montant),0,RowNo())))

i have the right balance of the last 60 days but the chart shows also the days before the 60 days (with no chart line) :

 chart.png

what do i miss in my expression? 

NB : my date format is DD/MM/YYYY.

joined a file as sample.

3 Replies
kaanerisen
Creator III
Creator III

Hi Azertyh,

You can use below expression to make it happen 🙂

Dimension: 

Date_journal

Measure :

sum({<Date_journal={">=$(=date(max(Date_journal)-60))"}>}aggr(rangesum(above(Sum(Montant),0,RowNo())),Date_journal))

 

Untitled.png

 

Hope it helps...

azertyh
Contributor II
Contributor II
Author

thanks for your suggestion @kaanerisen 

but the amount in the cumulative sum of montants (last 60 days ...) is different to the cumulative sum of montants.

you have 2 different amount for 30/05/2019 and following dates.

sunny_talwar

Have you tried unchecking 'Include Zero Values' under Add-on-> Data Handling?