Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show legend when there is one dimension in Line chart

Hi

I have a line chart in which there is one dimension(Date) and two expressions(Endorsement/Production) conditionally, then how would I show Endorsement/Production as a legend in my chart.

Please help.

Thanks

Saurabh

2 Replies
Not applicable
Author

HI Saurabh..

Normally you dont have an option to show the legend for such conditional expression however, there is an workaround...

you can use a dummy dimension.. but make sure you don't use any actual field as dimension.

like in your case create 2 calculated dimensions

='Endorsement' , using the enable condition for Dimension same as the enable condition of expression , and label as something you want as title of you legend ..

and

='Production'  same as was done for first dummy dimension/

This should solve your case

Check out the attached Demo App

MarcoWedel

Hi,

I'm not quite sure about your requirements, but one solution could be:

QlikCommunity_Thread_144869_Pic1.JPG.jpg

QlikCommunity_Thread_144869_Pic2.JPG.jpg

QlikCommunity_Thread_144869_Pic3.JPG.jpg

QlikCommunity_Thread_144869_Pic4.JPG.jpg

QlikCommunity_Thread_144869_Pic5.JPG.jpg

QlikCommunity_Thread_144869_Pic6.JPG.jpg

Instead of switching expressions with a button/variable, you can also combine independent expressions into one synthetic dimension using the valuelist() function:

QlikCommunity_Thread_144869_Pic7.JPG.jpg

QlikCommunity_Thread_144869_Pic8.JPG.jpg

QlikCommunity_Thread_144869_Pic9.JPG.jpg

hope this helps

regards

Marco