Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Changing null from '-' using text in chart

I'm working on an ERP dashboard and need to change the value of text-in-chart for my gauge chart from '-' to 'No Selection' as the users find it confusing when no field is selected, I've tried to implement an = If statement  but can't seem to get it to work.

This is the current expression:

=If(IsNull(GetCurrentField([SH Group]), 'No Selection', Num($(Rule1Dial),'#,##0.00%')

The default Null display is still '-' and my calculation no longer runs, however when the expression just reads

=Num($(Rule1Dial),'#,##0.00%')

I get the correct weighted percentage, but the Null value is still a hyphen. Would appreciate any help.

1 Solution

Accepted Solutions

Changing null from '-' using text in chart

Hi,

     Let me tell you one thing about your expression that you have missed one ')' .

     You can use the below expression.

    

      =If(IsNull(GetFieldSelections([SH Group])), 'No Selection', Num($(Rule1Dial),'#,##0.00%'))

      Here if the selection in SH Group is null then it will return No Selection or else the Num($(Rule1Dial),'#,##0.00%')

Regards,

Kaushik Solanki

4 Replies
MVP
MVP

Re: Changing null from '-' using text in chart

Maybe this?

=if(len($(Rule1Dial)),num($(Rule1Dial),'#,##0.00%'),'No Selection')

Changing null from '-' using text in chart

I like John's solution. However I'll point out that getCurrentField() is probably the wrong function to use in your test. GetCurrentField returns the current field of a group -- which would never be null.

-Rob

Changing null from '-' using text in chart

Hi,

     Let me tell you one thing about your expression that you have missed one ')' .

     You can use the below expression.

    

      =If(IsNull(GetFieldSelections([SH Group])), 'No Selection', Num($(Rule1Dial),'#,##0.00%'))

      Here if the selection in SH Group is null then it will return No Selection or else the Num($(Rule1Dial),'#,##0.00%')

Regards,

Kaushik Solanki

Not applicable

Changing null from '-' using text in chart

Thank you guys, works great now