Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Saurabh07
Contributor III
Contributor III

Aggregate the values for each month in line chart instead of individual points

Hello Gurus,

I am facing a issue in Qlik Line chart. I have mentioned data:

CountryDateValue
India01-01-202010
India02-01-202017
India03-01-202014
India04-01-202020
India01-02-202013
India02-02-202011
India03-02-202012
India04-02-202011
India01-03-202020
India02-03-202011
India03-03-202011
India04-03-202015
India01-04-202015
India02-04-202011
India03-04-202011
India04-04-202012
Germany01-01-202011
Germany02-01-202011
Germany03-01-202013
Germany04-01-202018
Germany01-02-202011
Germany02-02-202011
Germany03-02-202011
Germany04-02-202018
Germany01-03-202011
Germany02-03-202018
Germany03-03-202020
Germany04-03-202014
Germany01-04-202020
Germany02-04-202016
Germany03-04-202014
Germany04-04-202010
Italy01-01-202015
Italy02-01-202014
Italy03-01-202020
Italy04-01-202016
Italy01-02-202016
Italy02-02-202016
Italy03-02-202012
Italy04-02-202011
Italy01-03-202020
Italy02-03-202017
Italy03-03-202020
Italy04-03-202019
Italy01-04-202012
Italy02-04-202010
Italy03-04-202019
Italy04-04-202011

So what I want to see in line chart is basically the trend of values for each month. But below is the output I am getting. Instead of getting cumulative value for each month, the data is getting plotted for each date. Basically I need only one point for each month instead of 4.

Saurabh07_0-1607617155963.png

For months I want to see only past 3 month trend from the selected month. Below is the expression I am using but somehow it does'nt work:

sum({<Date={">=$(=addmonths(max(Date),-2))<=$(=addmonths(max(Date),0))"}>}Value)

Any help here would be highly appreciated.

 

0 Replies