Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
swarup_malli
Specialist
Specialist

Display '-' instead of 0 for a particular product in the pivot table?

Hi,

  I have  a requirment  where for 1 particular colmns(fact columns) which is displaying zero's (cos there is not data for that) i want to replace zeros with '-' ie for only one product, lets say there are 2 products A and B, if sum(profit) for A is 0, then replace it with -, if sum(Profit) for B is 0, then leave it unchaged.

I know replace function works for dimensions...i want it for the sum(profit)

ex:

lets assume sum(profits)  displays 0's for one particular product..i want to the logic to be included inside sum(profits)...tabkle is pivot table

instead of using:

if(sum(profits)=0,'-',sum(profit))

is there any other way of doing it

Any ideas

Thnx

SM

2 Replies
pover
Luminary Alumni
Luminary Alumni

If that product has no data associated to it, it wouldn't show up in the report.  It must have some some non-numeric or 0 associated with it, no?  Even the function numsum() considers non-numeric values as 0 so I don't think there is a better way of doing it then what you've already done unless you are able to modify the source data to stop showing products that don't sell.  Or, why do some products show '-' and others 0?

Karl

swarup_malli
Specialist
Specialist
Author

Karl,

   I agree with you, but the end user doens't want to see 0 , they want  '-' in plave of 0 , for that particular product.

Thanks

Swarup