The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Type | Type ID |
gamecode | 0 |
gamecode | 1 |
sensor state | 1 |
Solved! Go to Solution.
Hi @Bebo,
You can create a calculated column with SUBSTITUTE function to repalce values based on other column values:
Replaced =
IF (
Table[Type] = "gamecode",
SUBSTITUTE ( Table[Type], "code", Table[Type ID] )
)
Regards,
Xiaoxin Sheng
@Bebo with DAX you cannot replace the value but you can add another conditional column
New Type Column =
IF ( Table[Type] = "GameCode", "Game 1", "Else Value" )
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Thanks you for the quick response.
I could not get that to work. What I am trying to is this:
If Column Type = "game code" AND Column TypeID = "1", Output in conditional column would be "Game 1". Then I would repeat this for other TypeID numbers.
Hi @Bebo,
You can create a calculated column with SUBSTITUTE function to repalce values based on other column values:
Replaced =
IF (
Table[Type] = "gamecode",
SUBSTITUTE ( Table[Type], "code", Table[Type ID] )
)
Regards,
Xiaoxin Sheng
Thank you - worked perfectly.