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: 
mukesh19
Contributor II
Contributor II

Dynamic reference lines for bar chart based only on the filter pane

Hi all,

I have a bar chart, table and filterpane. I want to add the reference line for the bar chart in such a way that the reference line should be based on the filterpane, if no selection is done the reference line should show the complete value, If selection is done it should show only value related to that selection.  The important criteria is reference should not change  based on the other selections except the filterpane.

thanks,

mukesh

16 Replies
mohan_1105
Partner - Creator III
Partner - Creator III

Then it should be written in the other way,

sum({<x=,y=,z=,Subject = {$"GetFieldSelections(Subject)"}>} your_measure_field)

consultant_bi
Creator
Creator

Hi,

here is some pictures below show you how to do it, it based on random values but try it on your real ones.

Sans titre.png

Sans titre2.png

Sans titre3.png

Sans titre4.png

mukesh19
Contributor II
Contributor II
Author

x,y,z is for sample there are n number we cannot write all the conditions for all the fields in it right?

mohan_1105
Partner - Creator III
Partner - Creator III

Better you store all the field you used in the application by creating the variable like:

vNullification

field1=,field2=,field3=,etc

and use the expression

sum({<$(vNullification),Subject = {$"GetFieldSelections(Subject)"}>} your_measure_field)


unfortunately, there is no better choice other than this to my knowledge.

agigliotti
Partner - Champion
Partner - Champion

could you please make an example why you are saying it's not working ?

could you show me the expression you are using in reference line ?

mukesh19
Contributor II
Contributor II
Author

can u xplain how we eliminated all the selections expect subject. Can u once check it in your local and just conform

agigliotti
Partner - Champion
Partner - Champion

the expression shown to you does exactly what you asking for.