Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
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
Highlighted
Creator
Creator

This may help, MTD

While we teach we learn
Highlighted
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