Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Abhi999
Contributor III
Contributor III

Replacing '-' with '0' in pivot table

I used below query but still showing '-' in table

 

IF(ISNULL(count(order))='-', 0,count(order))

9 Replies
dmpilars
Partner - Creator
Partner - Creator

Hello!

The output of the ISNULL function will be -1 for TRUE, you cannot compare its output with a character because it is a boolean output, TRY:

IF(ISNULL(count(order))=-1, 0,count(order))

Best Regards, DMPS

Abhi999
Contributor III
Contributor III
Author

Thanks for quick reply,but still I can see '-' symbol in table

Madhur
Contributor II
Contributor II

Hi @Abhi999 ,

Count() and Sum() are two aggregate function that do not return the NULL value. If the value do not exist than 0 is returned, So there must be problem somewhere else.

Abhi999
Contributor III
Contributor III
Author

Then why I am getting '-' in pivot table

dmpilars
Partner - Creator
Partner - Creator

A calculation error, for example a division by 0, or can you have a dimension for which there are no calculation values ​​for the measure?

Madhur
Contributor II
Contributor II

Can you share the sample qvf to check ?

Abhi999
Contributor III
Contributor III
Author

Sorry I can't able to share qvf because it is highly ristricted. I will share some example.

dmpilars
Partner - Creator
Partner - Creator

For example, if you have a table like this:

dmpilars_0-1591311169552.png

 

and you try

dmpilars_1-1591311196100.png

you will have some options in your dimension for which there is simply no data

dmpilars_2-1591311207809.png

Will your dataset be something similar?  This is something that comes to mind very quickly and simply to illustrate one of the reasons for this type of output.

Abhi999
Contributor III
Contributor III
Author

Yes similar.