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/2019 | 19/02/2019 | 20/02/2019 | 21/02/2019 | 22/02/2019 | 23/02/2019 | 24/02/2019 | 25/02/2019 | 26/02/2019 | 27/02/2019 | 28/02/2019 | 1/03/2019 | 2/03/2019 | 3/03/2019 | 4/03/2019 | 5/03/2019 | 6/03/2019 | 7/03/2019 | 8/03/2019 | |
item 1 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 |
item 2 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
item 3 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Output
18/02/2019 | 19/02/2019 | 20/02/2019 | 21/02/2019 | 22/02/2019 | 23/02/2019 | 24/02/2019 | 25/02/2019 | 26/02/2019 | 27/02/2019 | 28/02/2019 | 1/03/2019 | 2/03/2019 | 3/03/2019 | 4/03/2019 | 5/03/2019 | 6/03/2019 | 7/03/2019 | 8/03/2019 | |
item 1 | N | N | Y | Y | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
item 2 | Y | Y | Y | Y | Y | Y | Y | N | N | N | N | N | N | N | N | N | N | N | N |
item 3 | N | N | N | N | N | N | N | N | N | N | N | Y | Y | Y | N | N | N | N | N |
Solved! Go to Solution.
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.
I've attached a sample workflow. Let me know if it works for you.
Best,
Roland
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 "/"
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!