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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Average of a measure

Hi,

 

In my Power BI, I want to do make a measure (Utilization rate per Shipment per StageOfRoute) like below:

 

Shipment    StageOfRoute      Product          WeightOfProduct         MaxWeight             UtilizationRateOfContainer

     A                      1                      x                            3                              10                                         80%

     A                      1                      y                            5                              10                                         80%

 

     A                      2                      x                            3                              10                                         80%

     A                      2                      y                            5                              10                                         80%

 

     B                      1                      x                            1                              10                                         70%

     B                      1                      g                            2                              10                                         70%

     B                      1                      u                            4                              10                                         70%

 

     B                      2                      x                            1                              10                                         70%

     B                      2                      g                            2                              10                                         70%

     B                      2                      u                            4                              10                                         70%

 

Total:                                                                                                                                                       75%

 

As you can also see, I would like the total to be the average utilization rate of the shipments ((1*70 + 1*80)/2 = 75).

 

The measure that I made now is working on row level, but the total is not correct. The formula that I have now is:

 

UtilizationRateOfContainer =
CALCULATE (
    AVERAGEX(
        'Table1';
        DIVIDE (
            [SumWeightOfProduct (this is a measure that is a sum of the weight of product per shipment stage of route)];
[MaxWeight]
        )
    );
    ALLEXCEPT (
        'Tabel 1';
        'Tabel 1'[Shipment];
        'Tabel 1'[StageOfRoute];
        'Tabel 1'[Product]
    )
)
 
But it is not working. Can somebody help me?
 
Thanks a lot in advance!
0 REPLIES 0

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors