Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reference Line Expression in Gauge

Hello,

QlikSense noob here. I have a Gauge chart that shows % of Female out of Total. I have added a reference line to show a "target" of 50%.

Now, I am trying to make this a dynamic target instead of a static 50% target. I would like to have this target change when I select a particular Job Level in a Filter Pane.

For Example, when I select Job Level='Executive', I want this target/reference line to be 27%, similarly when I select Job Level='Director' it changes to 40% and so on. How can I do this in the Gauge chart? I am guessing via the Reference Line Expression?

I tried applying the formula below but it didn't work. I am sure I am doing something wrong:-

= IF ({<[Job Level] = {'Executive'}>}[ID],27, [,50])

Thoughts?

Thanks!

Ankit

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Are these target percentages stored per Job Level in your data model? If so you can use something like =only(TargetPercentage). If not then you'll have to create an expression where you hard code the percentages:

=pick(1+match([Job Level], 'Executive','Director',...etc ), 0,50, 0.27, 0.40, ...etc )


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

Are these target percentages stored per Job Level in your data model? If so you can use something like =only(TargetPercentage). If not then you'll have to create an expression where you hard code the percentages:

=pick(1+match([Job Level], 'Executive','Director',...etc ), 0,50, 0.27, 0.40, ...etc )


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert ,

Thanks for your reply. These target %ages are not stored in my data model, and I'll need to create an expression. Let me try your expression and let you know what I find.

Regards,

Ankit

Not applicable
Author

Hi Gysbert ,

That worked! Thanks a ton...

Follow-up question please... So, the target is working as expected for individual job levels like Executive, Director, etc., however, when I multi-select 2 or more job levels the target disappears. Is there a way to show specific target percentages for a combination of job levels too?

For example, if I select Manager + Professional, it should be 50%... ?

Thanks,

Ankit