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.
Hello all - as always, thank you very much - in advance.
In a nutshell I would like to know if I there is a function in DAX that works the same as a the below Excel formula.
=
IF(ISNUMBER(SEARCH("AMASale",[@[Partners]])),"Amazon",
IF(ISNUMBER(SEARCH("CstcSale",[@[Partners]])),"Costco",[@[Non-Partners]]))))))
What the formula is doing is looking at the Partners column and for each cell (row) it is returning "Amazon" if within the string it says AMASale and "Costco" if within the string it says CstcSale. If nothing is found (meaning no AMASale or CstcSale) then it will return what ever is listed in the Non-Partners cell.
If you are all familiar with Excel, apologies for the explanation.
Is there a way for me to do something similar in PBI Desktop? I am thinking within PQE, add a new column and reference the columns I need but I am not sure on the correct DAX to use. Thanks
Solved! Go to Solution.
PQE? Is this Power Query?
If so, add a column with this code
if Text.Contains([Column1], "AMASale") then "Amazon" else if Text.Contains([Column1], "CstcSale") then "Costco" else [theothercolumn]
PQE? Is this Power Query?
If so, add a column with this code
if Text.Contains([Column1], "AMASale") then "Amazon" else if Text.Contains([Column1], "CstcSale") then "Costco" else [theothercolumn]
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 |
---|---|
49 | |
26 | |
21 | |
16 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |