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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.