Forum Discussion
if column contain keywords
- Anonymous9 years ago
We can get cleverer. Firstly, what is the formula to what you care about? Does it have to be the first 3 characters? Do you only want the ones that begin with F?
For example you could do something like:My Measure = IF( MID('YourTable'[Title], 4, 1) = "_", LEFT([Title], 3), "" )This will check if your title starts with XXX_ and the make the result XXX.
Does this idea help?
Thanks for the answer,
yes, it always FXX. So i need to do one by one condition until F30?
How if i would like to do in advance editor?
That version i gave you was for a calculated column in DAX, rather than in the "Edit Queries" section. Its not quite so easy in Power Query, however i'm not an expert at Power Query.
This should work fine as a calculated column.
- melina9 years agoHelper IV
So, is no other way just like copy for the first FXX?
Because i have dataset that the factory always change.
like this :
if (title,F01) then just copy title from the first 3 letter.
if i create one by one from F01 and F30, it might be possible if in future there is new factory.
- Anonymous9 years agoNot applicable
We can get cleverer. Firstly, what is the formula to what you care about? Does it have to be the first 3 characters? Do you only want the ones that begin with F?
For example you could do something like:My Measure = IF( MID('YourTable'[Title], 4, 1) = "_", LEFT([Title], 3), "" )This will check if your title starts with XXX_ and the make the result XXX.
Does this idea help?- melina9 years agoHelper IV
yes! you are correct.Thanks a lot!