Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

HOW TO DRAW LINES IN A CHART??

Hey guys! I gotta problem!

I have a bar chart, with various data, and values.

I need to find the average, and have a line cross the chart named as AVERAGE.

1) bar chart with data

2)need to calculate average of the data values,

3) draw a line across the bar chart which represents the AVERAGE value.

Can this be done ?

Thanks in advance! ( i am sorry, i do not have a qlikview file for this), could you pass me a sample ?)

1 Solution

Accepted Solutions
IAMDV
Luminary Alumni
Luminary Alumni

Here you go... Please follow the steps shown in the below image.

Also please mark the post answered if this is what you need 🙂

View solution in original post

17 Replies
Not applicable
Author

I'm not sure how to name the line Average, but in the Properties-> Expressions check trendlines average box and the show equation box.

Hope this helps.

Not applicable
Author

Alternatively, you can show the average value (if you have worked out the expression) as a reference line in the Presentation tab.

IAMDV
Luminary Alumni
Luminary Alumni

Cheenu - I did exactly the same and I could also name the reference line. This should be the simplest solution.

Cheers - DV

Not applicable
Author

Trend lines is a good option, however, you don't seem to have control over the colour of the line. Reference lines allows you to state the colour of the line, put a Label to it and attach a tick box in Show Label in Chart, which will show the label itslef in the chart object.

I guess that's the specs you are looking for.

Not applicable
Author

Hi Deepak,

Where did you find the label for the reference line, I can't find the label on any of the tabs (am I going blind)? Or did you put a text object on top of the chart?

Not applicable
Author

Sorry Deepak,

Confused. Thought you were referring to the trend line.

Not applicable
Author

Hi guys! i am not really sure about the Reference line thing!

I can get how you did the average, with the add solution thing. i did that too, but in my chart, the average line becomes something like ( Y=143).

I think that is the average value, but i'm not sure how to go about getting that.

And as for the reference line thing, how do you add the expression for the solution, or more likely, What is the expression for the solution ?

Any pointers? THanks! 😄

IAMDV
Luminary Alumni
Luminary Alumni

Please can you post the QV document with sample data. We can have a look...

Cheers - DV

gauravkhare
Creator II
Creator II

Hi Guys,

you need to add an expression by clicking on the ADD button. Over there you need to write the expression for average.

Make sure your are making a bar or a combo chart. After you have added the expression, select LINE from the Display Options. Now QlikView makes a line for you. Now if you want to change the color of the line then go to COLORS tab and click on the color representating your line, Now to change the color of the line just click on that particular color and then select from the given options as you want to go for one color, two color or solid....Then click on the base color tab and select the color of your choice and afetr applying the settings you'll find the color of your average line has changed to your desirous color.