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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
krichmond
Helper IV
Helper IV

Need Help Converting Codes Into Descriptions Using DAX

I have a field called "Mail Back Type" that resides in a table called "v_rp005_rejectreport" and within this field there could be a varying number of code values stored (see screenshot). Is it possible using DAX to take those code values and convert them into descriptions, separated by commas? The key of what each code represents is also provided below.

 

I tried doing this myself but was getting hung up on the situations where multiple codes are present in the "Mail Back Type" field.

 

MLBR01 = Signature Not Matching With Name

MLBR02 = Primary Insured

MLBR03 = Missing Required Information

MLBR04 = Need Of Notarized Document

MLBR05 = Account Number Required

MLBR06 = Coverage Amount Required

MLBR07 = Multiple Coverage Amounts Selected

MLBR08 = Credit Card Number Required

MLBR09 = Signature Required

 

Screenshot 2023-06-01 060451.png

1 REPLY 1
amitchandak
Super User
Super User

@krichmond , I think you have to use substitute multiple times in DAX

https://learn.microsoft.com/en-us/dax/substitute-function-dax

 

example

substitute(substitute([col1],"MLBR01","Signature Not Matching With Name"),"MLBR02","Primary Insured")

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.