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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Lausaurine
New Member

Transcoding column values from one table to another

Hello everyone, 

 

I have multiple tables in my model that contain binary values or codes that need to be translated to a corresponding label. For example, I have a client table, where the type can be 0 or 1, which means "Loyal" and "Other", or a country table where if the value is 1, it's France, if 2, it's England, 3 is Germany, etc. 

I have a table that I want to use to transcore these values that looks like this :

EntityCodeLabel
Client0Other
Client1Loyal
Country1France
Country2England
.........

 

My goal was to join the transcoding table to my other tables on the code, with the condition that the entity is the right name. In SQL, I would type :

select Label from transcode

where transcode.Code = Client.client_type

and transcode.Entity = "Client";

 

But I don't know how to achieve this in Power BI so that I can use labels instead of the codes in each table to build my report. 

 

Thank you all ! 

1 REPLY 1
amitchandak
Super User
Super User

@Lausaurine , we will join these two tables on code and cliend type and create one measure and use that with label in table visual

 

calculate(COunt(transcode[Label]), filter(transcode, transcode[Entity] = "Client" ))

 

refer if needed

DAX vs SQL: https://www.youtube.com/watch?v=WlvQ_SGy4iA&list=PLPaNVDMhUXGZNyKU0PgG2g3P0c6CPjMnj

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.