JL Thalacker
JL Thalacker

Reputation: 45

PowerBI calculated column - translate question

I want to create a calculated column that can translate several values into something that is more readable.

My example is something like a list of company departments, most are formatted with a formal name in the example below I'd like to calculate a column to convert acctng to Accounting

So the calculated column would read

I'd like to create a calculated column that transfers over all items as they are except, when we see accting it's converted to Accounting. I know that I can do a transformation in the data view, however, I'm hoping for a dax formula.

Thanks!

Upvotes: 0

Views: 35

Answers (1)

Andrey Nikolov
Andrey Nikolov

Reputation: 13460

If you want to do that with DAX, then you can create a new column and use SWITCH function:

Department (Translated) = 
    SWITCH(Sales[Department]; 
    "acctng"; "Accounting"; 
    "smtng"; "Something else"; 
    Sales[Department])

enter image description here

Upvotes: 1

Related Questions