Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hello Everybody,
Apologies in case this was answered already in this forum, but I wasn't able to find it...
I've one column (Division) in a table where I would like to change the value if a value in another column (Country) fulfills a criteria.
Looks like:
Value in [Division] should change to "Offshore", if value in column [Country] = "Oman"
I thought I was close with the following formula, but nothing happens.
= Table.ReplaceValue(#"Changed Type", each [Country] = "Oman" , "Offshore" ,Replacer.ReplaceValue,{"Division"})
Any ideas?
Thank you & Rgds
Tobias
Solved! Go to Solution.
Table.ReplaceValue(#"Changed Type", each if [Country] = "Oman" then "Offshore" else [Division], null, (x,y,z) => y, {"Division"})
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
@CNENFRNL Thanks for the quick response... I would highly appreciate if you could explain the ,null, (x,y,z) => y
piece...
Is this just filling the formula requirement?
Rgds
T
Table.ReplaceValue(#"Changed Type", each if [Country] = "Oman" then "Offshore" else [Division], null, (x,y,z) => y, {"Division"})
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.