cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
capalt
Advocate II
Advocate II

Transform 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"

1 ACCEPTED SOLUTION
amirabedhiafi
Solution Supplier
Solution Supplier

You can create a calculated column like below : 

Flag_Column_Transformed =

SWITCH (

SELECTEDVAUE (yourTable[Flag_Column]),

0, "Disabled",

1, "Enabled")

)

Amira Bedhiafi
Full Stack Business Intelligence Consultant @Capgemini

View solution in original post

1 REPLY 1
amirabedhiafi
Solution Supplier
Solution Supplier

You can create a calculated column like below : 

Flag_Column_Transformed =

SWITCH (

SELECTEDVAUE (yourTable[Flag_Column]),

0, "Disabled",

1, "Enabled")

)

Amira Bedhiafi
Full Stack Business Intelligence Consultant @Capgemini

Helpful resources

Announcements
Difinity Conference

Difinity Conference 2022

Difinity is the largest Microsoft Data, AI, Power BI, Power Platform and Business Applications Conference in New Zealand.

European Share Point Conference

European Share Point Conference

This conference returns live and in-person in Copenhagen this 28 November-01 December with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.