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: 
jkin
Contributor
Contributor

Monthly trend line in Line chart

I have a line chart that is sum of values per date (line chart image) 

 

 

Data example looks like this:

id       date         volume 
----------------------------
1      11/12/2019     203.1
2      11/12/2019     198.0
3      11/12/2019     209.0

which I have computed sum in Qlik and have following example data format for the line chart above:

date          sum 
--------------------
11/12/2019   610.1
11/17/2019   543.2
11/20/2019   550.8
11/30/2019   256.7
12/1/2019    1042
12/2/2019    885.1
12/4/2019    635.8
12/7/2019    967.4
12/10/2019   1011.3

I'd like to add a monthly trend line to make the trend look more obvious. So, for the example above, I want lines of November and December to have values of 490.2 and 908.3, respectively.

However, I can't figure out how to add measure that will compute the average of sum of values for that month and add a horizontal trend line for that month.

I found few posts on Qlik community and someone had suggested to use `sum(total <month> volume)/count(distinct total <month> date` , but <month> thing which he seemed to have used to add as conditional statement doesn't work for me somehow, even after I create master dimension/measure for month time frame. Any help would be appreciated.

Labels (2)
0 Replies