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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
ChrisDurham
Frequent Visitor

Relationships

Good Morning, I am trying to generate a budget vs actual report but can;t figure out how to set the relationships to work. I have the following structure :-

ChrisDurham_0-1609924858951.png

I have a customer table with customer details in, a budget table with a budget date, amount and customerID and an invoice table with invoice date, amount and customerID. What I want to be able to do is create a table with customer name on the left, months and years across the top and then the sum of invoices and the sum of budget amounts for each customer and each period. Clearly I need to link the customerID to both the budget and invoice table, but then I also need to make sure that I display only budgets and invoices from the same time period. What is the best way to achieve this ?

 

2 ACCEPTED SOLUTIONS
MattAllington
Community Champion
Community Champion

in short 
Delete the relationship between budget and invoices

Get a calendar table and join to budget and invoices

use the customers table and calendar table to slice and dice your visuals

write measures over your budget and invoices table



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

View solution in original post

amitchandak
Super User
Super User

@ChrisDurham , Do not Join, Budget and invoice, Create common tables like date or any other dimension join both tables with that.

https://www.seerinteractive.com/blog/join-many-many-power-bi/

https://www.youtube.com/watch?v=Bkf35Roman8

 

Try to be in star schema - https://www.sqlbi.com/articles/the-importance-of-star-schemas-in-power-bi/

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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@ChrisDurham , Do not Join, Budget and invoice, Create common tables like date or any other dimension join both tables with that.

https://www.seerinteractive.com/blog/join-many-many-power-bi/

https://www.youtube.com/watch?v=Bkf35Roman8

 

Try to be in star schema - https://www.sqlbi.com/articles/the-importance-of-star-schemas-in-power-bi/

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
MattAllington
Community Champion
Community Champion

in short 
Delete the relationship between budget and invoices

Get a calendar table and join to budget and invoices

use the customers table and calendar table to slice and dice your visuals

write measures over your budget and invoices table



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.