Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Graph intercept procedure

Hi all,

I have a graph as the one shown in the picture. The slider below the graph generates a vertical line (in black) which moves in the graph.

Can anyone help me in finding a way to retrieve the intercept value between the black line and the green curve. Is there any function I should use?

I thought that I could interpolate the greenline curve equation and calculate the Y value according to the X position of the black line, but maybe there is a easy way to get this without interpolating the green line point.

Thanks!

Intercept.jpg

This is the qv file.

4 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Can you post your qvw so we can take a look?

Not applicable
Author

Hi, I have posted the file. Thanks!

swuehl
MVP
MVP

Hi,

I think it is better to create / recreate your x-axis in the script, maybe like (untested):

INPUT:

LOAD

autonumberhash128 ( @5,@6 ) as [KeyVariable]

FROM

(txt, utf8, no labels, delimiter is '\t', msq);

OUTPUT:

LOAD

KeyVariable,

count(KeyVariable) as KVCount,

count(KeyVariable)+peek('KVCount') as KVCumCount

resident INPUT group by [KeyVariable];

I noticed that you have used an full accumulation in your graph, that's why I (tried) also to create a cumulated count.

So your expression in the text box could maybe look like:

sum(if(KVCount= scrollValue, KVCumCount)) / max(KVCumCount)

Everything untested, sorry.

Regards,

Stefan

Not applicable
Author

Thanks a lot, it pointed me to the right direction!