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

Promedio en tablas incorrectos

saludos.

 

Mi dura está en como usar el promedio de forma correcta.

El problema es que el promedio se calcula con base en los totales de cada columna:

el promedio de la columna "Promedio de SFV_Time elapsed__c FVJ es de 3.7, sin embargo el power bi se muestra 2.6, esto es porque está sacando el promedio de los totales, lo cual no es correcto para el fin que estoy buscando. pongo ejemplos en power bi y excel.

power bi hace bien la división en las filas individuales, pero al poner varias filas hace el promedio con los totales. ayuda porfavor

captura power bi1.jpgcaptura power bi2.jpg

1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

Hi @Anonymous 

 

You can try something like the following measure:

FVJ =
VAR _1 =
    AVERAGE( 'Table'[SFV_Time_elaspsed_c] )
        / AVERAGE( 'Table'[SFV_Time_elaspsed_c cuenta] )
VAR _2 =
    ADDCOLUMNS(
        ALL( 'Table' ),
        "avg", DIVIDE( [SFV_Time_elaspsed_c], [SFV_Time_elaspsed_c cuenta] )
    )
VAR _3 =
    AVERAGEX( _2, [avg] )
RETURN
    IF( HASONEVALUE( 'Table'[ID] ), _1, _3 )

 

Result:

vchenwuzmsft_0-1635386569456.png

 

I put the pbix in the attachment you can refer.

 

Best Regards

Community Support Team _ chenwu zhu

 

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
v-chenwuz-msft
Community Support
Community Support

Hi @Anonymous 

 

You can try something like the following measure:

FVJ =
VAR _1 =
    AVERAGE( 'Table'[SFV_Time_elaspsed_c] )
        / AVERAGE( 'Table'[SFV_Time_elaspsed_c cuenta] )
VAR _2 =
    ADDCOLUMNS(
        ALL( 'Table' ),
        "avg", DIVIDE( [SFV_Time_elaspsed_c], [SFV_Time_elaspsed_c cuenta] )
    )
VAR _3 =
    AVERAGEX( _2, [avg] )
RETURN
    IF( HASONEVALUE( 'Table'[ID] ), _1, _3 )

 

Result:

vchenwuzmsft_0-1635386569456.png

 

I put the pbix in the attachment you can refer.

 

Best Regards

Community Support Team _ chenwu zhu

 

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

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