I have read the other thread posted in this forum regarding searching for multiple values, but I don't think it quite fits my needs - but I may not fully understand what it is doing.
I have column "Mfg_Lot_Details" that is of various length for each record. Somewhere within the text string is "LTT", "LTM", or "LDP". I want to create a custom column that extract the one of those values or if none of those is there, then "Unknown".
In plain English, it would look something like this:
"MFG_Catg" =
If "Mfg_Lot_Details" contains "LTT", then "LTT",
If "Mfg_Lot_Details" contains "LTM", then "LTM",
If "Mfg_Lot_Details" contains "LDP", then "LDP",
Else "Unknown"
The "Mfg_Lot_Details" is only going to contain one of the three values (not multiple) and I put the "Unknown" in there just in case it doesn't have one of the three (haven't seen it happen yet).
I am new to Power Query and am learning M (even read Ken & Miguel's book). But after searching for several hours and reading several posts, I am not finding any good examples. Or perhaps I am not searching for the correct key words.
I've read about SWITCH as well, but I'm not sure if I should use it.
Any assistance in helping to explain the basics for searching for multiple criteria would be greatly appreciated; or pointing me to relevant posts.
Thank you,
TcO
I have column "Mfg_Lot_Details" that is of various length for each record. Somewhere within the text string is "LTT", "LTM", or "LDP". I want to create a custom column that extract the one of those values or if none of those is there, then "Unknown".
In plain English, it would look something like this:
"MFG_Catg" =
If "Mfg_Lot_Details" contains "LTT", then "LTT",
If "Mfg_Lot_Details" contains "LTM", then "LTM",
If "Mfg_Lot_Details" contains "LDP", then "LDP",
Else "Unknown"
The "Mfg_Lot_Details" is only going to contain one of the three values (not multiple) and I put the "Unknown" in there just in case it doesn't have one of the three (haven't seen it happen yet).
I am new to Power Query and am learning M (even read Ken & Miguel's book). But after searching for several hours and reading several posts, I am not finding any good examples. Or perhaps I am not searching for the correct key words.
I've read about SWITCH as well, but I'm not sure if I should use it.
Any assistance in helping to explain the basics for searching for multiple criteria would be greatly appreciated; or pointing me to relevant posts.
Thank you,
TcO