Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save $200. Learn More
fislar20
New Contributor II

What does a hyphen equal?

I have a report that returns a "hyphen" when there isn't any data in that timeframe.

My question would be, what does the Hyphen equal when I am composing a formula within an if statement?

10 Replies
Highlighted
MK9885
Honored Contributor II

Re: What does a hyphen equal?

They are nulls for that given value...

Ex:

If you have 5 dimensions and 1 measure, sometimes few of the rows will not show value for your measures but would show '-' as one of the dimensions in that table has value

Highlighted
Partner
Partner

Re: What does a hyphen equal?

hyphen represents null values.

You can find it with functions like isnull(), len(trim()), or simply comparing like: if(field = "",...

Highlighted
Jesh19
Contributor II

Re: What does a hyphen equal?

Can your please share your If condition?

And, also confirm your field names are properly spelled in the condition.

Highlighted
fislar20
New Contributor II

Re: What does a hyphen equal?

=if(num(sum($(Transaction_vSetYTD) $(vProfit_True))/sum($(Transaction_vSetYTD)$(vSales)),'#,##0.0%')='','No',Yes')

Highlighted
Jesh19
Contributor II

Re: What does a hyphen equal?

what's the output that you're getting from the above expression? Is that a hyphen?

what does the below expressions give you

-> sum($(Transaction_vSetYTD) $(vProfit_True))

-> sum($(Transaction_vSetYTD)$(vSales))

If the above expressions are always giving you some values, then the output of your expression is always 'YES'.

Highlighted

Re: What does a hyphen equal?

Seems, You expression not returning Null values, Try this way?

=if(IsNull(num(sum($(Transaction_vSetYTD) $(vProfit_True))/sum($(Transaction_vSetYTD)$(vSales)),'#,##0.0%')),'No',Yes')

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
fislar20
New Contributor II

Re: What does a hyphen equal?

I appreciate your suggestion, but that doesn't work.  it doesn't show a null value, just the hyphen

gpshow.JPG

Highlighted
fislar20
New Contributor II

Re: What does a hyphen equal?

gpshow.JPG

It doesn't always have a value.         First column is CY , second column is PY.     If no sales were in the CY or PY , it returns the  "Hyphen"

Highlighted
Jesh19
Contributor II

Re: What does a hyphen equal?

what is your dimension here in this chart?