Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi - Can you please let me know how to have different reference line in a trend chart when selecting different filter in Qlikview? Thanks!
If you wish to have different Reference lines according to filed selections you might try:
In this case if there is something selected in [YOUR FIELD] than the Reference line will appear if not that it's invisible.
Thanks for your swift response. I have "Hub" as filtering criteria and under that it can be "Hub 1", "Hub 2", "Hub 3", "Hub 4"
If I select Hub 1, then the reference line should be at 500 in the corresponding trend chart.
If I select Hub 2, then the reference line should be at 200.
If I select Hub 3, then the reference line should be at 300.
If nothing is selected, then the reference line should be at 600.
I used the below formula by right click on the Trend chart-->Properties-->Presentation-->Reference Line-->Conditional but it didnt work.
=If (GetFieldSelections(Hub) like 'Hub1*',500)
Elseif((GetFieldSelections(Hub) like 'Hub2*',200)
Elseif((GetFieldSelections(Hub) like 'Hub3*',300)
Else((GetFieldSelections(Hub) like ' ',600)
Attached the screenshot for quick reference.
I just tried this and it works only without selection. I am trying to make it work individually for Hub1,Hub2 and Hub3.
My bad, try this:
If(Right(GetCurrentSelections (Hub), 4) = 'Hub1', 500,
If(Right(GetCurrentSelections (Hub), 4) = 'Hub2', 200,
If(Right(GetCurrentSelections (Hub), 4) = 'Hub3', 300,
If(Len(GetFieldSelections(Hub)) = 0, 600))))
About GetCurrentSelections: