The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

Power BI

Power BI

0
Votes
3
Answer

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

365 Team
0
Votes

Hi,
This can be achieved with a Calculated Column using DAX.

ColumnName = IF(TableName[GenderCode] = 1, “M”, “F”)

0
Votes

Hi,
Thank you! Do you mean I have to create a new measure or a new Column?
Much appreciated!

365 Team
0
Votes

Please create a new column,