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
Anonymous
Not applicable

Efficiency Calculation + Relationship

Hello,

 

I been trying to create a computation of our company efficiency and I am really stuck on this.

Not sure if my relationship of table are correct or maybe the solution is just simple and Im over thinking this.

 

This is a Direct Query connection so I'm kinda limited with formula to use.

 

Computation Formula

Efficiency = Box Count / Output

Output = TargetNew x Machine x Minutes

TargetNew = Target/Conversion

 

Location/Variables

Box Count - located at "Box Table" table.

Machine - located at "Efficiency Table" table.

Minutes - Basically just minutes for that hour (these are the one that gives me issues, you can see below)

Target -  located at "Efficiency Table" table.

Convertion - located at "Conversion" table.

 

relationship pics.PNG

 

As of now here's what i have in powerBI

*is there a way to show the full minutes? see my excel file below (pics)*

wrong file.PNG

 

Compare to my excel file which is the correct calculation.

Difference/Variance

  • Minutes - you can see that theres a variance with my powerbi and excel file. Basically I want to put the full minutes, if its not possible, as long the grand total is correct. that would work.
  • See red highlight? - if there are two or more Order in an Hour it should just Average those in that hour.

 

Below show what we want to show in powerBI.

correct.PNG

I hope it make sense. I really appreciate any help.

 

Heres the PBIX file PBIX FILE 

Box Table and Order Detail are in direct query (In my Original File)

 

 

 

 

 

2 REPLIES 2
amitchandak
Super User
Super User

Not tested on your file. This is something that can be tried

Box Count = Sum('Box Table','Box Table'[Box Count])

Sum Minute = Sum('Box Table','Box Table'[Minute])


Box Per Min = sumx('Box Table' ,Divide('Box Table','Box Table'[Box Count],'Box Table'[Minute]))

Or 
Box Per Min = sumx('Box Table' ,Divide(sum('Box Table','Box Table'[Box Count]),Sum('Box Table'[Minute])))

Efficiency =
AverageX(summarize ('Order Details','Order Details'[Line],Conversion[Convertion],'Efficiency Table'[Machine],'Efficiency Table'[Target],"_box",[Box Per Min ])
, divide([_box],(Divide([Target],[Convertion])*[Machine])))


Efficiency =
AverageX(summarize ('Order Details','Order Details'[Line],Conversion[Convertion],'Efficiency Table'[Machine],'Efficiency Table'[Target],"_box",[Box Count],"_min",[Sum Minute])
, divide([_box],(Divide([Target],[Convertion])*[Machine]*[_min])))
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

unfortunately it didnt work. for some reason i cannot create the summarize formula. maybe because its a direct query to a manual table?

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.