Alteryx Designer Desktop Discussions

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

cleansing data tool

Xiaorui
7 - Meteor

Hi Community,

 

I have a table some are nulls and some are 0, I want to place null data with a dash - , as if replace the null with 0 will confuse with the original 0 data, but dash - is not numerical.

A table like this, fill blanks with dash and keep the 0.

Xiaorui_0-1673446992912.png

 

8 REPLIES 8
ShankerV
17 - Castor

Hi @Xiaorui 

 

You can overcome the issue with the Multi field formula.

Like below is the example.

 

ShankerV_0-1673447218170.png

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @Xiaorui 

 

I have mocked the data's to show how the output works.

 

Output:

ShankerV_0-1673447712916.png

 

Input:

ShankerV_1-1673447734058.png

 

 

ShankerV_2-1673447439254.png

 

 

Feel free to mark the solution of the post which helped to resolve the issue, so similar issues faced by other community members in future can be helpful to refer the solution.

 

Many thanks

Shanker V

binuacs
20 - Arcturus

@Xiaorui One way of doing this with the Multi-Field formula, the problem is all your data will be changed to string type

 

binuacs_0-1673448473490.png

 

Xiaorui
7 - Meteor

Hi Shanker,

 

Thanks for your answer, the thing is in this way the numerical data would change to Strings, but I need to keep them as numerical.

JamesCharnley
13 - Pulsar

If the field needs to stay numerical then there are no workarounds to have dashes in afaik. It needs to be a string. You'd have to do this as the final step if the dashes are purely for the sake of formatting, or you'll need to leave them null if zero isn't an option.

ShankerV
17 - Castor

Hi @Xiaorui 

 

Numerical columns cannot contain any other characters except digits.

It can be null or empty or 0.

 

Many thanks

Shanker V

Xiaorui
7 - Meteor

Hi James,

 

thanks for your answer.

 

Yes, it's just a formatting thing. When you say final step do you mean add dash manually or there is a way to add it using alteryx?

 

JamesCharnley
13 - Pulsar

Hi @Xiaorui 

 

I'm making some assumptions basically that you need it to stay numerical because you're applying calculations somewhere afterwards. If you were only adding the dashes as a formatting step to make it look nice to present the table as such, this could just be your final step.

 

What's the reason you need the field to be numerical?

Labels