Forum Discussion
AmiraBedh
Super User
4 years agoTransform flag columns to text values in DAX
I have a flag column in a fact table sales which is :
- 0 : disabled
- 1 : enabled
I want to have another column based on the previous one where I will change the data mapping like below :
0 : becomes "disabled"
1 : becomes "enabled"
You can create a calculated column like below :
Flag_Column_Transformed =
SWITCH (
SELECTEDVAUE (yourTable[Flag_Column]),
0, "Disabled",
1, "Enabled")
)
1 Reply
- amirabedhiafi
Impactful Individual
You can create a calculated column like below :
Flag_Column_Transformed =
SWITCH (
SELECTEDVAUE (yourTable[Flag_Column]),
0, "Disabled",
1, "Enabled")
)