# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
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

Tags (1)
1 Solution

Accepted Solutions
MVP & Luminary

## Re: Reference Line Expression in Gauge

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
3 Replies
MVP & Luminary

## Re: Reference Line Expression in Gauge

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

## Re: Reference Line Expression in Gauge

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

## Re: Reference Line Expression in Gauge

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