Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Chiara
Contributor II
Contributor II

Line from the start to a chart straight to the end

Hello,

I guess that this will be a very easy question, but i cannot find a solution on my own

I have a bar chart, dimension MyMonth_year,measure sum of received calls 

first bar is jan-20 (then the rest of the year) and end with jan-21

What they ask to me is to add a line which connects jan-20 with jan-21 -- no calculation at all, just a straight line that connect the two values

purpose is just to see if the volume of calls is going up or down from the first bar to the last bar.

of course it should be dynamic, so if i choose for example feb-20...to dec-20, line should connect directly feb with dec

I attach an example  to show the expected result.

Chiara_0-1612195433981.png

 

thanks

Labels (1)
  • Chart

8 Replies
sonkumamon
Creator
Creator

Chiara
Contributor II
Contributor II
Author

Thank you!

Thank you!

I already checked, I can’t understand how to achieve what i need.

sonkumamon
Creator
Creator

Just insert the number you need in the reference line expression:

sonkumamon_0-1612263267098.png

 

Chiara
Contributor II
Contributor II
Author

Thank you

my main problem is that I don’t have a “fixed” number.

It will change as i need it to go from the value of the first month_year selected to the last one, with a straight line

example: if selected month_years are from jan-20 to jan-21, and value are 30 for jan-20 and 50 for jan-21, the line should go from 30 to 50, straight

i think i need an expression with min(monthyear) and max(monthyear) involved, not and to exclude all the other monthyears selected. Not sure how to do it

sonkumamon
Creator
Creator

Hi, 

This is quite complex and you will have to use a combo chart.

Please take a look at point 2 on this post:

http://livingqlikview.com/how-to-reference-line-linear-trend-qlik-sense/

 

Chiara
Contributor II
Contributor II
Author

Hi,

I checked the link, still can't figure out what i need to do. 

thanks anyway

 

Ksrinivasan
Specialist
Specialist

hi,

mydata

Ksrinivasan_0-1612380097220.png

chart type : Barchart

DIM: Date,

Measure1: Max(sales)

Measure2:  linest_m(total aggr(max(sales),Date),Date)*Date + linest_b(total aggr(max(sales),Date),Date)

result

Ksrinivasan_1-1612380315326.png

ksrinivasan

 

 

Chiara
Contributor II
Contributor II
Author

Thanks, maybe the chart i used in my first post is not good enough to explain my “struggle”. 
I use yours, adding a line

E2AD9C13-C22E-4331-9CCE-3CA967C5152E.jpeg

 just a straight line that connect the value at the first date with the value at the last date

hope it makes more sense