Start Free Trial

Alteryx Designer Desktop Discussions

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

Removing a date from a cell based on a condition

Luk88kk
8 - Asteroid

Good morning,
I have a problem that I would like to clarify.
My task is to remove from Row A entry "#" and automatically delete date in row "B" and "C".
I do it by changing in Select Tool date type to V_WString and then use this two formulas:

if ([field_1] = "#")
then [field_2] = "" and [field_3] = ""
else [field_1]
endif

 

ReplaceChar([field_1], "#", "")

 

It's works but I wonder if there is a way to do it in a more simple way?

This is the table:

 

Luk88kk_0-1623308142819.png

 

I would be grateful for any guidance

 

3 REPLIES 3
mceleavey
17 - Castor
17 - Castor

Hi @Luk88kk ,

 

the trick here is to make it dynamic, so when you add more columns and rows it automatically applies the logic. I've done this by transposing the data into a single column and applying a multi row formula to the single column before cross-tabbing back:

 

mceleavey_0-1623311149970.png

 

mceleavey_1-1623311166549.png

 

mceleavey_2-1623311178548.png

 

 

Hope this helps,

 

M.

 

 

 

 

 



Bulien

Luk88kk
8 - Asteroid

I wouldn't have figured it out myself.

Thank you very much for your help.

Have a nice day!

mceleavey
17 - Castor
17 - Castor

no problem.gif



Bulien

Labels
Top Solution Authors