Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
prakashsonti
Contributor II
Contributor II

Add the average line to a line chart with multiple lines Qlik Sense

This question is about creating a "Average" line in a line graph that has multiple lines.  

There has been a recommendation in the "QlikView" threads that meets my needs but does not work in QlikSense.  I am wondering if there is an alternate implementation.

Attached image shows what I want to achieve and the problems.

Attached QlikSense file is a sample and also attached Excel file with sample data.IssueImage.png

 

2 Replies
sunny_talwar

Check attached

Script

[Sheet1]:
LOAD
	[Date],
	[State],
	[Revenue]
 FROM [lib://AverageLinewithMultipleLines/AverageLineDataSet.xlsx]
(ooxml, embedded labels, table is Sheet1);

Dim:
LOAD * INLINE [
Dim
1
2
];

Chart

Dimension

Date
=Pick(Dim, State, 'Average')

Expression

=Avg([Revenue])

image.png

prakashsonti
Contributor II
Contributor II
Author

Thanks for the quick reply. This works great!