Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
NingMel
Frequent Visitor

Calculated column to add new value

I got a column in a table showing 'Work Order Type' (text column).  I need to add a new column to show a different value. 

For example if Work Order Type is 1, value in the new calculated column should show "1 - Reactive WO"

For example if Work Order Type is 2, value in the new calculated column should show "2 - Proactive WO", else shows "".

 

I thought I could use Switch , but it seems that Switch does not support comparing values of type Text.  What command should I use?

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your DAX formula in the SWITCH function looks like, but please check and try the below.

Instead of writing 1 or 2, please try writing "1" or "2".

Because the column is TEXT data type, 1 and 2 in the column are also TEXT. So, I think, writing in a way of "1" or "2" (inside double quotation mark) might work for your case.

Thanks.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your DAX formula in the SWITCH function looks like, but please check and try the below.

Instead of writing 1 or 2, please try writing "1" or "2".

Because the column is TEXT data type, 1 and 2 in the column are also TEXT. So, I think, writing in a way of "1" or "2" (inside double quotation mark) might work for your case.

Thanks.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hi @Jihwan_Kim ,

Thank you.  I figured that out as well 🙂 I did delete this message but it's not gone.  Well I think I leave it here anyway, it may help others some way.  Thanks again.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.