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
android1
Post Patron
Post Patron

Subtract 2 measures from different tables

Hi,

 

How do I subtract these 2 measures from different tables?

 

I have a simple measure Carers who worked = CALCULATE(DISTINCTCOUNT(vw_PivotWagesHrs[CarerRef])) which tells me how many people who worked. Filtered over Weeknum.

 

This measure below (in table Carerslist) shows me the total available workforce in any particular week.

 

 YTD Workforce running total in Weeknum =
CALCULATE(
[YTD Workforce],
FILTER(
ALLSELECTED('MyDateTable'[Weeknum]),
ISONORAFTER('MyDateTable'[Weeknum], Max('MyDateTable'[Weeknum])-1, DESC)
)
)

 

I want to figure out how many people did not work in each week ie  YTD Workforce running total in Weeknum - Carers who worked.

 

The relationship between the 2 tables(CarersList & vw_PivotWagesHrs) is many to one Single cross filter.

 

Relationship between CarersList & MyDateTable is many to one Single cross filter.

 

 

 

1 REPLY 1
Veles
Advocate V
Advocate V

So long as the fields you are using as filter context (i.e. what you're using for rows on a table visual) affects both tables you can literally just make a measure as you've written it.

 

You might need to switch some relationships to be bi-directional, or create a new dimension tables (e.g. a date table that has a relationship to both of your tables).

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.

Top Solution Authors