Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
patricesalem
Creator II
Creator II

Hide measure legend combined with qsVarialble

Hello

I'm using QS Variable to let users choose wheather they want to display quarter, semester sales, targeted sales...

ScreenShot124.jpg

Everything works great using the Pick function in the measure Expression and a if fucntion for displaying or not the label:

Example for the Target 2018 measure

Expression :

pick (vAffichageTarget,

Sum([2018 Target]),0

)

Label

= if ($(vAffichageTarget)>0,'Target '& year(now()),null())

If I click on "Without Target 2018", the target 2018 bar disappears and the label shows the colour and "-" next to it.

ScreenShot125.jpg

I would like the legend to disappear (I have unchecked "show null values" from the add-ons options) AND I would also like to remove the empty space previously taken by the Target 2018 bar (to make the chart less wider).

Any idea ?

Thanks

pat

4 Replies
petter
Partner - Champion III
Partner - Champion III

Try to change your measure into:

Pick (vAffichageTarget,

Sum([2018 Target]), Null()

)

patricesalem
Creator II
Creator II
Author

‌hi

i had already tried before...same result

i have tried with

0

nul()

"

same result with all

patricesalem
Creator II
Creator II
Author

Hello

I went through many different posts. Qlik should hide the legend using Null() in the expression (both in the measure and in the label).

I have also tried to use alt(expression, null()) : still the same issue, the legend keeps coming back with the coloured square and - next to it.

Is it a qlik sense bug ?

Is there any extension that could fix this issue ?

thanks

pat

patricesalem
Creator II
Creator II
Author

Hello Again

I'm advancing with my issue

I had a similar behaviour with a pivot table located in the same report.

When using if ($(vAffichageTarget)>0,Sum([2018 Target]), Null()), the pivot table was showing - in the target 2018 column instead of hiding the column.

There is an option below the the pivot table expressions "Display column if":

Image 1833.jpg

This option did the job !

Is there an option for doing the same with charts ?...or a way to do the same ?

thanks