Last answered:

08 Jun 2020

Posted on:

07 Jun 2020

0

Power BI

Hi, How do I have a categorical variable from  integer to text form in Power BI. For example, I have Gender coded as 1 = Male, 2 = Female. How do I change these in Power BI from 1, and 2 to "Male" and "Female" without having to revert back to excel? Thank you  
3 answers ( 0 marked as helpful)
Instructor
Posted on:

08 Jun 2020

0
Hi, This can be achieved with a Calculated Column using DAX. ColumnName = IF(TableName[GenderCode] = 1, "M", "F")
Posted on:

08 Jun 2020

0
Hi, Thank you! Do you mean I have to create a new measure or a new Column? Much appreciated!
Instructor
Posted on:

08 Jun 2020

0
Please create a new column,

Submit an answer