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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Krzysztof_Hyla
Helper II
Helper II

Matching quantity with hours to calculate earned hours

I'd like to multiply quantity of units produced or forecasted for a particular month by the appropriate standard hours - the result measure will be called 'Earned Hours'.

 

Normally a sumx and related formula should work, but the thing is that we have to apply current standard hours to future months in the formula.

 

Table 1: Production_Forecast

ScenarioPeriodModelQuantity Produced or Planned
Actual201901A5
Actual201901B6
Actual201911A3
Actual201911B4
Actual201912A7
Actual201912B8
Forecast202001A5
Forecast202001B4

 

Table 2: Standard Hours

PeriodModelDepartmentStandard Hours
201901ABackshop5
201901AFinal Assembly2
201901BBackshop6
201901BFinal Assembly1
 
201912ABackshop7
201912AFinal Assembly2.5
201912BBackshop8
201912BFinal Assembly3

 

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

So what is the result you are looking for?

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

The measure should add results from two calculations:

1) For months tagged as "Actual" - multiply quantity produced by the related hours for particular month (Excel sumproduct formula): quantity from Jan 2019 times standard hours from Jan 2019, quantity from Feb 2019 times standard hours from Feb 2019

2) For months tagged as "Forecast" - multiply quantities from all months by the last available standard hours (Dec 2019 standard hours in the example shown)

 

Here is the model:

Model.jpg

 

and PBIX file: Earned Hours.pbix 

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.