Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Replace "0" by blank in .xlsx output

Axis
7 - Meteor

Hi, 

 

I have a workflow with many 0 (= zeros), the data type for these columns are "Double". 

I want to ouput my file in .xlsx (basic Excel format) but I want all the 0 replaced by a blank. 
I want to keep the data type as a number and not a string. 

 

Do you have and advice on how to do it? 
And what would be the most efficient way if I have 150+ columns and many rows? 

 

Thanks a lot for your help,

Best regards,

Axis

6 REPLIES 6
Emil_Kos
17 - Castor
17 - Castor

Hi @Axis,

 

Null with work for you?

 

Please check if this solution work as you expected:

 

Emil_Kos_0-1605715846742.png

The output:

 

Emil_Kos_1-1605715860231.png

Good Luck!

marcusblackhill
12 - Quasar
12 - Quasar

Hey @Axis!

 

So, to you do that you just need to create a formula in formula tool like:

IIF([field]=0,"",[field])

 

That way will work for all rows of the field! Now, if you need to do it for many columns as well, you can use the multi-field formula tool, there you can point the columns you want to point the formula and even to select new unknown columns as well.

 

Hope that help!

Emil_Kos
17 - Castor
17 - Castor

Hi @marcusblackhill,

 

good point with the multi field formula. I forgot that there are plenty of columns to work with.

 

I proposed using null option as I am not sure you can make double field blank.

marcusblackhill
12 - Quasar
12 - Quasar

@Emil_Kos 

 

yeah, sorry I didn't saw @Axis have a double field, but you're right!. So just need to change with select tool to string before the formula tool, will work like the same for you!

 

If you need to make some numeric formula with the data after data, only need to put the field with tonumber([field]) and works well.

Emil_Kos
17 - Castor
17 - Castor

Hi @Axis,

 

Thank you for marking my post as an answer.

 

Good luck!

Axis
7 - Meteor

THank you both for your quick anwsers. 

Multi fields with null() was the good solution to keep the data type = double. 

Best regards,
Axis

Labels
Top Solution Authors