Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
fislar20
Contributor II
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
MK9885
Master II
Master II

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

lcontezini
Partner - Creator
Partner - Creator

hyphen represents null values.

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

Jesh19
Creator II
Creator II

Can your please share your If condition?

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

fislar20
Contributor II
Contributor II
Author

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

Jesh19
Creator II
Creator II

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'.

Anil_Babu_Samineni

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')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
fislar20
Contributor II
Contributor II
Author

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

gpshow.JPG

fislar20
Contributor II
Contributor II
Author

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"

Jesh19
Creator II
Creator II

what is your dimension here in this chart?