Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Qlik Developers
I have a line chart in which i have reference lines based on the lab selection the reference lines will appear on the chart. I have written expression for the reference lines its working fine. But my sales team is going to add more labs and values to the data. I have hard coded ! the expressions. I want the reference lines to be automatic. Can someone help me please?
Thanks
Anil
Thanks Steve. I have achieved this by writing the below expressions. Its displaying the reference lines based on the selections.
=SubField(Concat(Distinct cluster_density.failAbove,';',cluster_density.failAbove),';',
(SubStringCount(Concat(Distinct cluster_density.failAbove,';',cluster_density.failAbove),';')-1))
=SubField(Concat(Distinct cluster_density.failAbove,';',cluster_density.failAbove),';',
(SubStringCount(Concat(Distinct cluster_density.failAbove,';',cluster_density.failAbove),';')))
Thanks
Anil
Is it that you would only want to show reference lines if one Lab was selected?
If so, simply load in a table which has the Lab name (with a matching field name to the current Lab field) and each of the values you want to show, e.g. CD Pass Limit.
Each expression would then be simply:
=Only([CD Pass Limit])
The only function will return null if there is more than one possible value, or the value if there is only one.
If you wanted to blend the values for the lines across Labs you could use:
=Avg([CD Pass Limit])
This would give you values that were not particularly meaningful though, I would suggest.
Hope that helps.
Steve
Thanks Steve. I have achieved this by writing the below expressions. Its displaying the reference lines based on the selections.
=SubField(Concat(Distinct cluster_density.failAbove,';',cluster_density.failAbove),';',
(SubStringCount(Concat(Distinct cluster_density.failAbove,';',cluster_density.failAbove),';')-1))
=SubField(Concat(Distinct cluster_density.failAbove,';',cluster_density.failAbove),';',
(SubStringCount(Concat(Distinct cluster_density.failAbove,';',cluster_density.failAbove),';')))
Thanks
Anil