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
BarryFletcher
Helper III
Helper III

Subtract Table / Column Value from Measure Value?

Hi all,

 

I have a value set in a measure for Allocated Hours. I am looking to subtract the Total Hours column (as filtered by a slicer) from that value but it keeps telling me the table / column are not found? Any help would be appreciated.

 

Screenshot 2024-03-15 113709.jpg

2 ACCEPTED SOLUTIONS
DataInsights
Super User
Super User

@BarryFletcher,

 

You need to wrap Table1[Total Hours] in an aggregate function such as SUM. I would create the measure below, and then the New Balance measure can be [Allocated Hours] - [Total Hours].

 

Total Hours = SUM ( Table1[Total Hours] )

 





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

Proud to be a Super User!




View solution in original post

@BarryFletcher,

 

You can use the CALCULATE function to control filter context. I prefer to keep base measures free of filters so they can be used as building blocks for other measures. Thus, you could have a measure like this:

 

Total Hours Filtered = CALCULATE ( [Total Hours], FilterCondition1, FilterCondition2 )

 





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

Proud to be a Super User!




View solution in original post

5 REPLIES 5
BarryFletcher
Helper III
Helper III

 

Total Hours = SUM ( Table1[Total Hours] )

 

Is there a way to fileter the above so that if only sums certain values / ros in the Total Hours column? 

@BarryFletcher,

 

You can use the CALCULATE function to control filter context. I prefer to keep base measures free of filters so they can be used as building blocks for other measures. Thus, you could have a measure like this:

 

Total Hours Filtered = CALCULATE ( [Total Hours], FilterCondition1, FilterCondition2 )

 





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

Proud to be a Super User!




Thanks for the help - very much appreciated.

DataInsights
Super User
Super User

@BarryFletcher,

 

You need to wrap Table1[Total Hours] in an aggregate function such as SUM. I would create the measure below, and then the New Balance measure can be [Allocated Hours] - [Total Hours].

 

Total Hours = SUM ( Table1[Total Hours] )

 





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

Proud to be a Super User!




Excellent - worked a treat - thank you

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.