Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Applying the same formula across columns and rows

YLYONG
9 - Comet

Hi Alteryx Community,

 

Wanting to know how can we apply the same formula across the columns and rows without painstakingly writing individual formulas for each field

 

If the sum of the day (18/02/2019) and the next five days is greater than of equal to 6, then the result for 18/02/2019 is "Y", otherwise, "N".

 

Thankyou.

 

Input

 

 18/02/201919/02/201920/02/201921/02/201922/02/201923/02/201924/02/201925/02/201926/02/201927/02/201928/02/20191/03/20192/03/20193/03/20194/03/20195/03/20196/03/20197/03/20198/03/2019
item 10011111110001001001
item 21111111111110000000
item 30000100001011111111

 

 

Output

 

 18/02/201919/02/201920/02/201921/02/201922/02/201923/02/201924/02/201925/02/201926/02/201927/02/201928/02/20191/03/20192/03/20193/03/20194/03/20195/03/20196/03/20197/03/20198/03/2019
item 1NNYYNNNNNNNNNNNNNNN
item 2YYYYYYYNNNNNNNNNNNN
item 3NNNNNNNNNNNYYYNNNNN
3 REPLIES 3
RolandSchubert
16 - Nebula
16 - Nebula

Hi @YLYONG ,

 

you can transpose your columns to rows, use a Multi-Row Formula tool and use a Cross-Tab tool to get the required structure.

 

2022-01-18_09-55-46.jpg

 

I've attached a sample workflow. Let me know if it works for you.

 

Best,

 

Roland

YLYONG
9 - Comet

@RolandSchubert 

Thank you, it works. It's interesting to note when a date field is cross-tabbed, the format changed from 18/02/2019 to 18_02_2019

 

Also, a very neat way to use Dynamic Rename to change "_" back to "/" 

atcodedog05
22 - Nova
22 - Nova

@YLYONG 

 

Solution authors are Happy to help : )

If the solution author's response helps please don't forget to mark it as a solution.

Cheers and have a nice day!

Labels