Forum Discussion
Bebo
Helper II
3 years agoReplace Value in One Column based upon condition in another Column
I am trying to create a dax expression that will replace the value in one column based upon a condition in another column. For instance, in the following table, if the "gamecode=1" in Type Column), r...
- Anonymous3 years ago
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
- 3 years ago
Thank you - worked perfectly.
Bebo
Helper II
3 years agoThanks 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.
Anonymous
3 years agoNot applicable
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
- Bebo3 years ago
Helper II
Thank you - worked perfectly.