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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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")

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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