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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
TomG
Regular Visitor

Replace labels with related table

Hi guys,

 

I'm trying to get my head around MS PowerBI, so I'm trying to create several diagrams. Now, I have a dataset which is very simple. I've got 2 tables from a PostgreSQL database, one of them has a foreign key to the other one, like an ENUM value. I now want the labels to match. So instead of a number e.g. 1, I want "Product 1", which is in the ENUM table.

 

Is this possible? And how do I achieve this?

 

Thanks!

 

1 ACCEPTED SOLUTION

Thanks for your answer! That was already done, didn't solve my problem though 😞 I ended up creating a calculated column with the RELATED() function. 

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

On the left hand side, the third icon down looks like three little boxes. Click on that. You should see your tables listed with their fields in the main canvas area. Choose your field and drag it to the related foreign field. You need to have one of these tables to have unique values in the columns you are relating. Then you can use fields from both tables and they will be related to one another. If you do not have unique values in both tables, then create a third query to your data that only imports distinct values for whatever is the key you are using to relate your tables. Relate both tables to that table.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Thanks for your answer! That was already done, didn't solve my problem though 😞 I ended up creating a calculated column with the RELATED() function. 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.