Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
pradnyat
Creator
Creator

Expression as legend in Line Chart

Hi All,

We are using one line chart to show 2 Expressions: Market Share and Benchmark Market Share.

We have activated 'Expression as legend' from Expression tab.

This Expression legends are coming fine when we have some value for both the expressions, But in case where we don't have market share but we are getting Benchmark Market Share , there expression legends are not coming.

Is there any solution for this.

Thanks in Advance... !

6 Replies
alexandros17
Partner - Champion III
Partner - Champion III

unfortunately no, automatic legend comes out only with more that an expression

hope it hlelps

vinay_hg
Creator III
Creator III

try to write the same expressio n for lagends in lagend option

Anonymous
Not applicable

Pradnya

I guess that your Expression legend disappears when all values to be displayed are null.

If so then try something like this for your expression to flip nulls [& anything else not a valid number] to zero :

     =alt ( [MarketShare] ,0  )

datanibbler
Champion
Champion

Hi,

by default, expressions - and the corresp. figures in the legend - will only be displayed if there is anything to be displayed.

So you have two options: Either you somehow fill the rows in the table (in the script) where that value should be with a 0 in case there is no value, so QlikView always has something to show - or you deactivate that checkbox and create some free_text_boxes instead.

Clever_Anjos
Employee
Employee

Easier solution is putting some textboxes as legend

reshmakala
Creator III
Creator III

If you want to put some legends manually as text, there is an option with the properties.

Go to the chart properties -> Presentation tab..At the bottom right, you have text in chart. Add the text that you wanted to add and set the angle as per how you need it to display in your chart.

When you get the text in the chart, Press and hold Ctrl+Shift and drag it to the place you wish to put it.

Hope that helps!