Extract Column Header to Cell Value if Value >1

Hi All,

I have a workflow where I’ve pivoted a column to rows and aggregated a VIN count in each of the new resulting columns. However, I’d like to insert the name of the column into each specific cell if the value of that current cell is greater than 1. If it’s missing or not greater than 1 then do nothing.

Any ideas?

Welcome to the forum.
I would recommend you to look at

If statement works like in Java. Please look for examples on the Hub.

1 Like

I don’t think that’s an optimal solution. I have 80+ columns that I’d have to write separate IF statements for. See example below.

if (column(“22 High Gloss Black Wheels”) >=1)
{“22 High Gloss Black Wheels”} else {null}

Ideally there would be some automated process where if a value is >=1 then it automatically replaces that value with the name of the column header.

Hi @M5Nelson7,

I think I understand what you want to do but can you either upload or paste an example of your incoming table structure? I could give it a try.

If you are familiar what I’m thinking is you pass each column using column loop. Then regex rename the column to a generic name like “column”. Then use a rule engine to do your if column >=1 then pass the original column name into that cell if not then null.

Then you use regex rename to convert back to original column name.

Does that help?

Hello @M5Nelson7,

trick you can use is Unpivoting, Rule Engine and back with Pivoting.

See this example:

Hope this helps and welcome to Community!


Thanks for the response…Here’s a quick snapshot:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.