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

Power BI Relationship Help

I have 2 excel files. One has all my main data but the data source does not always have a clean Account Name value, and many of my Accounts Number change from year to year. I have another table with Account Names all clean and the Parent Account Numbers. I need Power BI to link the 2 sheets. So for Example my full data set might have Account number 148 and 124 as Adventure Sports and Do Not Use Adventure Sport, the second sheet has 148 and 124 both as Adventure Sports with Parent account 148. So i want to have as a result in my slicer when i add 148 as the parent account it pulls the data from Full Data  on 148 and 124.

1 ACCEPTED SOLUTION

@olindeman You could create a calculated column in the 2nd table to determine the "Account" that you want to use...

Account = IF(Table2[Parent Account] = BLANK(), Table2[Account Number], Table2[Parent Account])


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

View solution in original post

5 REPLIES 5
olindeman
New Member

I have 2 excel files. One has all my main data but the data source does not always have a clean Account Name value, and many of my Accounts Number chnage from year to year. I have another table with Account Names all clean and the Parent Account Numbers. I need Power BI to link the 2 sheets. So for Example my full data set might have Account number 148 and 124 as Adventure Sports and Do Not Use Adventure Sport, the second sheet has 148 and 124 both as Adventure Sports with Parent account 148. The result i need in my slicer is that when account number 148 is selected it pulls the data for both 148 and 124.

Hi @olindeman,

Could you please share sample data of your scenario and post the expected result here?

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Main sheet looks like this, this sheet has 30k plus lines a day

Account numberAccount NameSale
148Aventure Sport3
124DO NOT USE Adventure Sport4
34567Dons Cars5


Second sheet looks like this has 160 accounts max

Account numberParent AccountAccount Name
148148Aventure Sport
124148Aventure Sport
34567 Dons Cars

 

My goal would be to relate the sheets somehow so that sheet 1 when it sees 124 it knows to attribute those sales to 148, however when nothing is in sheet two it uses sheet ones account number. Like with Dons Cars, it does not have a parent account so i need it to use 34567.

Would this not be possible?

@olindeman You could create a calculated column in the 2nd table to determine the "Account" that you want to use...

Account = IF(Table2[Parent Account] = BLANK(), Table2[Account Number], Table2[Parent Account])


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

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