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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
k943
Helper I
Helper I

Creating a measure based on a column from another linked table

I have 2 tables linked together: Employee table and Sales Order table (1:many relationship using Employee ID key and Created by Employee ID key)

 

I want to create a measure in Sales Order table that count number of sales order quantity created by people from Asia office.

k943_0-1677588810544.png

so in the second table, sales document number 111,114,115 are created by employee 001 and 003 and they are all from Asia office according to the Employee table. The result should be 50+100+50 = 200

1 ACCEPTED SOLUTION
HughLa
Resolver IV
Resolver IV

Hi @k943 

 

Can you try this:

 

ALL SALES (ASIA) = CALCULATE(SUM(Sales[OrderQuantity]),ALL(Sales),Employee[Country] = "Asia")

 

 

Hugh

View solution in original post

1 REPLY 1
HughLa
Resolver IV
Resolver IV

Hi @k943 

 

Can you try this:

 

ALL SALES (ASIA) = CALCULATE(SUM(Sales[OrderQuantity]),ALL(Sales),Employee[Country] = "Asia")

 

 

Hugh

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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