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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
MyNameHere2213
Regular Visitor

How to Sum by field on different table

 

I'm trying to create a measure that will Sum the forecasted and actual proceeds a client receives for all of the companies they own. Data model is structured in a star schema with Clients as the fact table and all other tables as dimensional.

Data Model:

DimSubCompanies

  • ClientID
  • SubCompanyName

FactClients

  • ID

DimPaymentActual

  • PaymentID
  • ClientID
  • Net to Client

DimPaymentForecasted

  • PaymentID
  • ClientID
  • Net to Client
MyNameHere2213_0-1721843105182.png

 

 

The table I'm trying to make should look like this

SubCompanyNameForecasted Net to ClientActual Net to Client
SubCompany11000
SubCompany2500 
SubCompany3250250
 

 

Instead the current table I have looks like more like this where it's summing the entire client across all the companies they own.

SubCompanyNameForecasted Net to ClientActual Net to Client
SubCompany1850250
SubCompany2850250
SubCompany3850250
 

How can I get my table to look like the first one?

2 REPLIES 2
audreygerred
Super User
Super User

Hi! In a star schema the DIM tables are the 1 side on 1:M. Your fact table should be the many and ideally, avoid bi-directional joins.

 

Is Client ID the key for Sub-category? What granularity level is that dim table at? What level of granularity is actual and forecast at?





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

Proud to be a Super User!





It's been a while since I've done this, you are correct maybe I should look at restructuring my model.

 

ClientID is a FK for the Client table that contains various information about the client (name, location, email, etc.).  The actual and forecasted tables are granular to a specific transaction and I can see what they should have received and actually received for every transaction that occurred.

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors