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

Conditionally showing reference lines

Hi,

I have a requirement to create a bar chart with multiple reference lines and conditionally show and hide those reference lines. Can anyone suggest how to do this in qlik sense ??

7 Replies
qlikview979
Specialist
Specialist

Gysbert_Wassenaar

I'm afraid you'll have to create a custom extension with that functionality. I know of no existing extension that offers reference lines that also have the option to conditionally show and hide them.


talk is cheap, supply exceeds demand
soumyadash28
Contributor
Contributor
Author

Yes that is something I would finally be doing. But any help using Qlik Sense default options would be of great help.

Thanks

bwisealiahmad
Partner - Specialist
Partner - Specialist

Hi,

Agree with Gysbert on this one. If you want it to appear or disappear based on a condition you would look into an extension, but maybe you could have the reference line be 0 and conditionally give it a dynamic name whether or not it should be 0 or an actual line?

Best,

Ali A

DavidŠtorek
Creator III
Creator III

Hi,

maybe it is not necessary to use extension. If you want to show reference line only in some cases than just simply use if condition in reference line expression.

Like in attached pictures I am using expression

=if(GetSelectedCount(Date)=1,vMonthCapacity+vYearCapacity)

This works that when no date is selected then nothing (no reference line) is displayed. If onde date is selected than reference line is displayed.

Hope this helps

Anil_Babu_Samineni

Is that reference Lines need to show in horizontal / Vertical. And more over, We don't have future to add multiple reference lines in to chart in sense that too there is no feature to show and hide in sense and even View. So, I even afraid why the business needed.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Hannes
Partner - Contributor
Partner - Contributor

Hi David
May I ask, what is your variables?
vMonthCapacity = ?
vYearCapacity = ?

Jut want to wrap my head around this