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
Mdobbels
Frequent Visitor

Relationship between tables

Hi everyone,

 

I'm having trouble to correctly link two tables. Let's call them Revenue and Forecast. Below you can find a 
Both Revenue and Forecast are linked via the date with a 1 to many relationship with a table Calendar.

 

As the Revenue table has multiple transactions for the same client and the same kind on the same day, it's not possible to merge the queries (because this way I get duplicates of the Forecast table, resulting in a too high Forecast). If I try to solve it with relationship between tables, I have a many-to-many relationships. Neither way I succeed in getting the right result. At the moment the only solution I see is making a pivot table of the Revenue table but as I already have many things running with this table, I would prefer to avoid this. 

 

Revenue table: 

DateClientRevenuetransaction kind
01/01/2021A30mail
01/01/2021A30Parcels
01/01/2021A60Mail
01/01/2021B400Parcels
01/01/2021B200Parcels
01/01/2021C30mail
02/01/2021A30mail
02/01/2021A60parcels
02/01/2021B400Parcels
02/01/2021C200Parcels

 

Forecast

DateClientForecastTransaction kind
01/01/2021A100Parcels
01/01/2021B500Parcels
01/01/2021C2500Parcels
02/01/2021A110Parcels
02/01/2021B550Parcels
02/01/2021C2000Parcels
01/01/2021A10Mail
01/01/2021C100Mail
02/01/2021A50Mail
02/01/2021C1000Mail
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Mdobbels , You need to have common Table/dimension tables Transaction kind, Date and client and join them with both tables and analyze

 

Create common table -https://www.youtube.com/watch?v=Bkf35Roman8

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Mdobbels , You need to have common Table/dimension tables Transaction kind, Date and client and join them with both tables and analyze

 

Create common table -https://www.youtube.com/watch?v=Bkf35Roman8

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.