Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a column A and column B. I want to add new column C like-
if coulmn B contains specific text1 and column A contains another specific text2 then put text X in column C else if coulmn B contains specific text3 and column A contains another specific text4 then put text Y in column C else if coulmn B contains specific text5 and column A contains another specific text6 then put text Z in column C and so on.
Can some one please help me with the formula?
Solved! Go to Solution.
hi @Ramendra
In edit queries, you could use the logic of this formula:
if( Text.Contains([Column A],"text1") and Text.Contains([#"Column B#(lf)"],"text2"))
then "X"
else if( Text.Contains([#"Column B#(lf)"],"text3") and Text.Contains([Column A],"text4"))
then "Y"
else if( Text.Contains([#"Column B#(lf)"],"text5") and Text.Contains([Column A],"text6"))
then "Z"
else null
and here is sample pbix file, please try it.
Regards,
Lin
hi @Ramendra
In edit queries, you could use the logic of this formula:
if( Text.Contains([Column A],"text1") and Text.Contains([#"Column B#(lf)"],"text2"))
then "X"
else if( Text.Contains([#"Column B#(lf)"],"text3") and Text.Contains([Column A],"text4"))
then "Y"
else if( Text.Contains([#"Column B#(lf)"],"text5") and Text.Contains([Column A],"text6"))
then "Z"
else null
and here is sample pbix file, please try it.
Regards,
Lin
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |