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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.