Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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

  • 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:

     

    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.

1 Reply

  • v-chenwuz-msft's avatar
    v-chenwuz-msft
    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:

     

    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.