Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
shabarish0587
Contributor
Contributor

Need to accumulate till selected month for that Year

Hi Guys,

                I need one help. i want to display accumulated data based on selection.

for example if i select  2019-06, it should accumulate  value from 2019-01 to 2019-06 and divided by count of year month value in chart. for example:

2019-01,2019-02,2019-03,2019-04,2019-05,2019-06

100,200,400,300,100,200

Total accumulation is 1300 till 2019-06 divided by 6(number of months till selected) expected answer is 216. can any one help me how to write the expression on this

1 Solution

Accepted Solutions
vhespinog
Contributor III
Contributor III

May be this

=sum({$<YearMonth={">=$(=Date(YearStart(YearMonth,0),'YYYY-MM')) <=$(=Max(YearMonth))"}>}Amount)
/
Num(Month(Max(YearMonth)))

 

see attached

 

View solution in original post

2 Replies
Victor_Alumanah
Creator
Creator

This may help, MTD

While we teach we learn
vhespinog
Contributor III
Contributor III

May be this

=sum({$<YearMonth={">=$(=Date(YearStart(YearMonth,0),'YYYY-MM')) <=$(=Max(YearMonth))"}>}Amount)
/
Num(Month(Max(YearMonth)))

 

see attached