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
mumair
Helper I
Helper I

Averaging Minimums not Working Correctly

So ultimately what I want to do is calculate the average minimum time between two different events at each location.

 

In order to do this, I started with making a column:

NOR2CargoLoading = datediff('Time Log'[Notice of Readiness Tendered],'Time Log'[Commenced Cargo Loading],minute)

 

After this, I needed to find the minimum time per voyage.

Min of NOR2CargoLoading min per Voyage # =
MINX(
 KEEPFILTERS(VALUES('Time Log'[Voyage #])),
 CALCULATE(MIN('Time Log'[NOR2CargoLoading]))
)

 

At this point, everything is working correctly. Next I tried to average the minimums and this is where things start to go south:

Min of NOR2CargoLoading min per Voyage # average per Location =
AVERAGEX(
 KEEPFILTERS(VALUES('Time Log'[Location])),
 CALCULATE('Time Log'[Min of NOR2CargoLoading min per Voyage #])
)

 

Instead of calculating the average for each location, it is calculating the minimum for each location. Any advice?

1 REPLY 1
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @mumair,

 

Could you also post some sample data and your expected result? So that we can better assist on this issue. Smiley Happy

 

Regards

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.