Forum Discussion

Andrea78m's avatar
Andrea78m
Frequent Visitor
8 years ago

average per hour

hallo,

I'd get for each operator the average throught the hours

so I put:

DDD =
AVERAGEX (
    SUMMARIZE (
        DMGLR04L;
        DMGLR04L[CODICE_OPERATORE];
        DMGLR04L[ORA_];
        "ZZZZ"; SUM ( DMGLR04L[NUMERO_COLLI_INTERI_NON_PALLET] )
    );
    [ZZZZ]
)

 

but the sum is not corret

The result is 230,33, instead 205,57

 

where is the error?

thanks for help

 

2 Replies

  • v-ljerr-msft's avatar
    v-ljerr-msft
    Microsoft Employee

    Hi Andrea78m,

     

    Could you try the formula below to see if it works? :smileyhappy:

    DDD =
    AVERAGEX (
        SUMMARIZE (
            DMGLR04L;
            DMGLR04L[CODICE_OPERATORE];
            DMGLR04L[ORA_];
            "ZZZZ"; CALCULATE ( SUM ( DMGLR04L[NUMERO_COLLI_INTERI_NON_PALLET] ) )
        );
        [ZZZZ]
    )
    

    Regards

    • Andrea78m's avatar
      Andrea78m
      Frequent Visitor

      unfortunately the result is the same.

      I tried also to count ORA_:

      DDD =
      AVERAGEX (
          SUMMARIZE (
              DMGLR04L;
              DMGLR04L[CODICE_OPERATORE];
              DMGLR04L[ORA_];
              "ZZZZ"; count ( DMGLR04L[ORA_] )
          );
          [ZZZZ]
      )

       

      but it gives me an incorrect value.

      It gives me 21.33 instead 3??