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
jd8766
Helper II
Helper II

Handling multiple FACT tables in data model?

Hello, hopefully someone can advise me on this (I am not new to PBI, just the data modelling side..)

I have an existing model that looks like the below - a Sales Fact table connected to multiple dimensions. It's relatively simple..

jd8766_0-1656498367804.png


I have been given 2 new tables to add which can be joined via the ContractKey. One is a payments table that shows all payments we have had per contractkey, and one is a paymentsschedule table to show all payments we expect to have (so we can see if we are being paid on time or not)

jd8766_1-1656498447287.png


What would be the best way to incorporate these into my model? So I can query things such as sum(paymentamounts) / sum(paymentexpectedamount) by supplier or product. Another one I can see being asked for is SUM(PaymentAmount) / SUM[Sales'Value'] as this would show the % paid off each contract..

Just looking for some opinions on the best way of approaching this really.. would a new FACT table work which could then be joined via the contract dimension?

1 REPLY 1
DataInsights
Super User
Super User

@jd8766,

 

One approach would be to join these two new tables to the contract dimension. Then use CROSSFILTER to calculate the measures you mentioned:

 

Payment Amount = SUM ( FactPayment[PaymentAmount] )
Payment Expected Amount = SUM ( FactPaymentSchedule[PaymentExpectedAmount] )
Payment Amount ÷ Payment Expected Amount = 
CALCULATE (
    DIVIDE ( [Payment Amount], [Payment Expected Amount] ),
    CROSSFILTER ( DimContract[ContractKey], FactSales[ContractKey], BOTH )
)

 





Did I answer your question? Mark my post as a solution!

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.