About EasyMorph Tutorials & Examples Web-help

Keep/Remove Columns by Condition

Hi,

is it possible to remove Columns by Condition?


KeepWantedColumnNamesWithValues.zip (8.0 KB)

It would be great, if the remove/Select Column Actions will get Partameters :slight_smile:

Can I do it with a trick (Rename by lookup …)

Regards,
Adrian

Hi Adrian,

you can already do this with EasyMorph. You can use the “Table metadata” action to produce a list of columns, filter it as necessary (e.g. using a condition), and the use the “Select by lookup” action to keep only the necessary columns.

I’ve updated your example to work like that.

KeepWantedColumnNamesWithValues (2).zip (8.3 KB)

Hi Dmitry,

really great, thanks :+1::blush:

But now i have another problem in my process if i want to stay generic :woozy_face:

Only certain rows should be returned for one wanted column ("where WantedCol1=‘WantedVal1’)

The table should be filled down for the respective value. Somehow I can’t get there

is it possible to “filldown” the wanted Columns without specifying the column name, so that the Outputable looks like this picture

That would be great because it would be the solution for my last post:

best regards and thanks again,

Adrian

In this case the “Iterate column” action should help.

See the updated example below.
KeepWantedColumnNamesWithValues (3).zip (8.8 KB)

Hi Dmitry,

I will try this. Thank you for this great support :clap::pray:

Best regards,

Adrian

You’re welcome :slight_smile:

Hi Dmitry,
unfortunately it don’t works.
The “generic Filldown” should start after the first match of “WantedVal1” and only Rows with “WantedVal1”. So WantedVal1 (or “WantedVal2”) should be a generic Filter in Filldown-Iteration.
Your solution gifs me OutputTable in Top but it should be the bottom one.
Sorry i was 3 days out, Therefore I could test only now.

regards,

Adrian

Hi,
here another example of the same problem.
I would like to fill the column with filldown, but only if a certain criterion is met.

In the example, only the area should be filled with the value until the criterion is no longer met or changes (only Data in Green Box should me modified)

FillDownFromAboveDependingValue.morph (4.3 KB) FillDownFromAboveDependingValue.zip (9.9 KB)

I hope this example is better for understanding my Problem.

best regards,

Adrian

How about this one?

FillDownFromAboveDependingValue (2).zip (10.2 KB)

Hi Dmitry,

it works, thanks. I also tried with filldown, but dont’t wanted to change existing data. But it should work, because data is rewritten to old value after filldown. :relaxed:

By the way. I sometime miss a “previous” or “above”-Funktion :wink:
Is it planed?

best regards and thanks again,

Adrian

Above/below values can be obtained using the “Shift column” action.

ok, thank you, i’ll test it :+1:

To learn more about EasyMorph visit easymorph.com.