Hi there,
Amateur Alteryx user... I want to dynamically remove columns based on a 0 total row. See image below. I have read that the dynamic select tools is best, but I cannot figure out the best way to do this. Anyone know how?
Solved! Go to Solution.
If your zero columns always have zeros in all rows, you'll probably get away with something like this.
Another option might be to use a dynamic rename first and build some sort of logic to insert the word zero into the column names where total is zero, then you can use a formula in the dynamic select tool like
!contains([Name],'zero')
@DavidP - Size function does not seem to work when the values under the fields are positive numbers .I tried with a different data set with an additional column with just positive numbers under it.
@joshuaslater61 - https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Dynamic-Select/td-p/523145 , have you seen this post and the solutions posted ? It's pretty much similar to what you are asking for, just need to tweak it a bit to pick the last 1 row instead of the first row and check if its zero.
Here's the tweek that @ramesh_neel mentioned
The "check if zero" formula is a little complex
if !Regex_match([Value],"[a-z]+",1) and !isnull([Value]) and tonumber([Value])=0 then
"Zero"
else
[name]
endif
It renames if the value doesn't contains any characters, the value isn't null and value itself is 0. The extra conditions are there to catch things like extra columns that don't have numeric data and columns that don't have a value in the total row.
Dan
@danilang This was fantastic and simple! Thank you so much. YOu taught me more about the dynamic rename tool as well, I appreciate it.
Yes, brilliant, and simple to implement. Thank you!
User | Count |
---|---|
19 | |
15 | |
15 | |
9 | |
8 |