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
ms499
New Member

Covert data label codes to easy to understand entries

Hello,

 

I'm new to the world of Power BI.

 

So, I have have a database filled with an large array of data.  Much of the cell entries has coded elements to it.  I'm trying to understand how best to convert the code within the cell entries to a entry where codes are transalatable to easy to understand English versions of the original cell entries. 

 

For instance I have a column that has a range of 168 codes within it.  I want to be able to convert each code to something more understandable / relatable. 

 

So for instance, I have a code that reads 'H121' in the original data and I want to be able to convert this to it's translatable version which in this case should be 'H121 Fire Safety Engineering'

 

Is there a way I can achieve this without having to go through each one of the code within the dataset?

 

With thanks in advance for any help in received.

 

Thanks and best wishes, Mike.

1 ACCEPTED SOLUTION

@ms499 

 

No worries Mike.

 

The idea with Power Query/Power BI is that the original data remains as it is.  You bring it into PQ/PBI and then transform/merge it with other data, then use the output from those processes to produce reports, visuals etc.

 

If your data is in a database and you want to add the extended codes/descriptions to that data, you'd need to create a table within the database with the codes and descriptions (my 1st image), and then do the merge/join within the database, basically adding another column to the current data/table.

 

You'd do this using SQL in the database itself, not through PQ/PBI.

 

Regards

 

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

3 REPLIES 3
PhilipTreacy
Super User
Super User

Hi @ms499 

I've created a PBIX file you can download and open to demonstrate the process below

You'll need to set up a table with the codes and the extended code/description, something like this

codes.png

 

and if your data looks something like this

code-data.png

 

then you can merge/join the two together to get a result like this

joines-table.png

Regards

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hi Phil,

 

That's brilliant.  Many thanks for this.  Sorry for being padantic but, how do I go about blending / introducing the generated list of codes back into the original dataset and apply the new translatable cell entries into it?

 

Thanks and best wishes, Mike.

@ms499 

 

No worries Mike.

 

The idea with Power Query/Power BI is that the original data remains as it is.  You bring it into PQ/PBI and then transform/merge it with other data, then use the output from those processes to produce reports, visuals etc.

 

If your data is in a database and you want to add the extended codes/descriptions to that data, you'd need to create a table within the database with the codes and descriptions (my 1st image), and then do the merge/join within the database, basically adding another column to the current data/table.

 

You'd do this using SQL in the database itself, not through PQ/PBI.

 

Regards

 

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


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.

Top Solution Authors
Top Kudoed Authors