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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Syndicate_Admin
Administrator
Administrator

Help with calculating average measured subtotals

Good afternoon.

I need a help, which I have not given how to calculate these averages in the image table.

1 - OTIF MP suppliers84%
2 - OTIF suppliers ME - Line86%
3 - OTIF suppliers ME - Special84%
4 - OTIF suppliers RE Stock imported96%
5 - OTIF suppliers RE Stock national82%
6 - OTIF Non Stock Suppliers80%
7 - OTIF suppliers products and others54%

The average should give me 81% but gives me 83%.

2021-08-24_15h12_04.png








OTIF Supplier (%) =
Var xComply = [OTIF Supplier (Complies)]
Var xNoCumple = [OTIF Supplier (Not Compliant)]
Var xIndicator = DIVIDE(xCompupe,[Total],0)
RETURN
IF(xComply > 0,ROUND(xIndicator,2),IF(xNoComply>0,0))

OTIF Proveedor_AñoAnterior =
var xYearAnt = MAX ( 'Calendar'[Year] )-1
var xUpdate = [OTIF Provider (%)]
RETURN
IF(NOT(ISBLANK(xCurrent)),
CALCULATE ([OTIF Provider (%)],DATESYTD(Calendar[Year]-1

I need this measure to average me the average 81% which is the real not that 83%

OTIF Supplier *Base Point (%) =
var xUpdate = [OTIF Provider (%)]
var xIndicator = SELECTEDVALUE(Dim_OTIF[OTIF Proveedor_Indicador])
RETURN
IF(NOT(ISBLANK(xCurrent)),
CALCULATE(AVERAGEX(Dim_OTIF,Dim_OTIF[OTIF Provider *Base Point (#)]),
Dim_OTIF[OTIF Provider *Base Point (#)] <> BLANK(),
ALLEXCEPT(Dim_OTIF,Dim_OTIF[OTIF Proveedor_Indicador])))

Agardezco a lot

Thank you

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @AOHORQUEZ ,

 

How about this? 

OTIF Supplier *Base Point (%) =
VAR xUpdate = [OTIF Provider (%)]
VAR xIndicator =
    SELECTEDVALUE ( Dim_OTIF[OTIF Proveedor_Indicador] )
RETURN
    IF (
        NOT ( ISBLANK ( xCurrent ) ),
        AVERAGEX (
            FILTER (
                ALLEXCEPT ( Dim_OTIF, Dim_OTIF[OTIF Proveedor_Indicador] ),
                Dim_OTIF[OTIF Provider *Base Point (#)] <> BLANK ()
            ),
            Dim_OTIF[OTIF Provider *Base Point (#)]
        )
    )

 

If this doesn't work, could you share me a sample .pbix file for test?

 

Reference: How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

 

Best Regards,

Icey

 

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

1 REPLY 1
Icey
Community Support
Community Support

Hi @AOHORQUEZ ,

 

How about this? 

OTIF Supplier *Base Point (%) =
VAR xUpdate = [OTIF Provider (%)]
VAR xIndicator =
    SELECTEDVALUE ( Dim_OTIF[OTIF Proveedor_Indicador] )
RETURN
    IF (
        NOT ( ISBLANK ( xCurrent ) ),
        AVERAGEX (
            FILTER (
                ALLEXCEPT ( Dim_OTIF, Dim_OTIF[OTIF Proveedor_Indicador] ),
                Dim_OTIF[OTIF Provider *Base Point (#)] <> BLANK ()
            ),
            Dim_OTIF[OTIF Provider *Base Point (#)]
        )
    )

 

If this doesn't work, could you share me a sample .pbix file for test?

 

Reference: How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

 

Best Regards,

Icey

 

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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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