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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
juanconsuela123
New Member

Measure Expression Problem

Hi, I was having a problem on calculating a measure, where I want to know the utilisation percentage of a truck by customer. Here is the table example:

 

Customer NameItem WeightVehicleVehicle TypeVehicle Space
A500ABCSINGLE TIRE2000
A600ABCSINGLE TIRE2000
A700ABCSINGLE TIRE2000
A1000CDEDOUBLE TIRE4000
A2000CDEDOUBLE TIRE4000
B300FGHSINGLE TIRE2000
B400FGHSINGLE TIRE2000
B500FGHSINGLE TIRE2000
B750IJKDOUBLE TIRE4000
B600IJKDOUBLE TIRE4000

 

VEHICLEWEIGHTVEHICLE SPACETRUCK UTILISATION
ABC1800200090%
CDE3000400075%
FGH1200200060%
IJK1350400034%

 

CUSTOMER NAMEAVG TRUCK UTL
A83%
B47%
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @juanconsuela123 ,

 

I suggest you to try code as below to create measures.

TRUCK UTILISATION = 
VAR _ITEM =
    CALCULATE ( SUM ( 'Table'[Item Weight] ) )
VAR _SPACE =
    CALCULATE ( MAX ( 'Table'[Vehicle Space] ) )
RETURN
    DIVIDE ( _ITEM, _SPACE )
AVG TRUCK UTL = 
AVERAGEX (
    SUMMARIZE ( 'Table', 'Table'[Customer Name], 'Table'[Vehicle] ),
    [TRUCK UTILISATION]
)

Result is as below.

vrzhoumsft_0-1690877186747.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @juanconsuela123 ,

 

I suggest you to try code as below to create measures.

TRUCK UTILISATION = 
VAR _ITEM =
    CALCULATE ( SUM ( 'Table'[Item Weight] ) )
VAR _SPACE =
    CALCULATE ( MAX ( 'Table'[Vehicle Space] ) )
RETURN
    DIVIDE ( _ITEM, _SPACE )
AVG TRUCK UTL = 
AVERAGEX (
    SUMMARIZE ( 'Table', 'Table'[Customer Name], 'Table'[Vehicle] ),
    [TRUCK UTILISATION]
)

Result is as below.

vrzhoumsft_0-1690877186747.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

TomMartens
Super User
Super User

Hey @juanconsuela123 ,

 

without any hint about calculating the measure, it's hard to provide a DAX statement.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors