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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply

Measure to sum column values based on another table, based on yet another table

Hi all,

 

Part of my data model consists of 3 tables below. I'm trying to create a measure that sums SalesAmount for projects whose ProgramIDs can be found in Dim_Program (in Dim_Projects, there are several ProgramIDs that do not appear in Dim_Program, and some ProgramIDs that do). Not sure how to write the formula.

 

Hope this makes sense; I'm very new to DAX. Thanks in advance!

 

1. Dim_Program

ProgramIDProgram Name
aaaProgram1

 

2. Dim_Projects

ProjectIDProjectNameProgramID
100Project1aaa

 

3. tblSales

ProjectIDSalesAmount
100500
2 REPLIES 2
Jocke
Regular Visitor

As long as you have the relationships properly set ut between your tables you shouldn't need to create a measure visualize the Sales amount / program.

By proper relationship I mean:

Dim_Program 1-->M Dim_Projects & Dim_Projects 1-->M tblSales

After you made sure that's done you should be able to drag the sales amount and program name into a visual and get the desired result.

Thanks a lot for the reply! @Jocke 

 

I do have the relationships set up like that. I still need this in the form of a Measure as I need to subtract this measure from another measure to arrive at... another measure (all of these measures are used separately in different charts). Could you recommend an appropriate formula? 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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