Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to add conditions to labels in legend?

I have Site & Month added on the Dimensions and Count of tickets resolved in Expression.

I am displaying count of tickets resolved site wise for the required month as a line chart. Legend displays the Sites : India, UK, Mexico etc

I need to display FTE count in the legend for the required Site as per the Application selected from the Listbox.

FTE count is different for every site as per Application

Can anyone assist me what condition do I need to add to the Labels in Expression? I thought of adding getfieldselection(Application = 'App1',) but I also need it as per the sites. All sites are to be displayed and in the graph.

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You can't do much with the legend. What you can do is disable it and create a straight table with whatever conditions you want. You can make the straight table look like a legend. Create the straight chart add the dimension, add any expressions you need and remove totals, the header, the caption, make cell borders transparent etc. The example posted here has such a fake legend hovering on top of the chart.


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You can't do much with the legend. What you can do is disable it and create a straight table with whatever conditions you want. You can make the straight table look like a legend. Create the straight chart add the dimension, add any expressions you need and remove totals, the header, the caption, make cell borders transparent etc. The example posted here has such a fake legend hovering on top of the chart.


talk is cheap, supply exceeds demand
Not applicable
Author

Did you try and check the box Show numbers in legend .

Go to Chart properties-->Presentation->Check Show numbers in legend

Hope this helps

Anonymous
Not applicable
Author

Thanks Gysbert

It worked..

Anonymous
Not applicable
Author

Chart Properties doesnt have Hide Legend for Bar chart. This feature is present only for Pie Chart

Not applicable
Author

there was no mention of Bar chart. but yes I agree. Glad it worked.