Forum Discussion

Raul's avatar
Raul
Post Patron
8 years ago
Solved

Total is wrong in a matrix

Hello,

 

I have this matrix visualization:

 

 

 

The value of the matrix it's a measure like this:

Hour = IF(SELECTEDVALUE(Calendar[Year])=2017;SUM(T1[Hours]);IF(SELECTEDVALUE(T2[Type])="Abono";SUM(T2[Hours]);SUM(T1[Hours])))

 

Bescause I need sum the hours of the records from one table if it's values are from 2017 and sum the hours of the other table, if the type is "Abono" otherwise. The Abono and Expedient columns are correct but, why the Total column it's wrong? Is the Total column not the sum of the Abono and Expedient columns?

 

Thank you.

  • Hi Raul,

     

    Could you try using the formula below to create a new measure to see if it works? :smileyhappy:

    Measure = SUMX ( SUMMARIZE ( T2; T2[Type]; "abc"; [Hour] ); [abc] )
    

     

    Regards

3 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Community Champion

    HI Raul

     

    Try this MEASURE

     

    Measure =
    IF (
        HASONEVALUE ( TableName[Colaborador] ),
        [Hour],
        SUMX ( ALLSELECTED ( TableName[Colaborador] ), [Hour] )
    )
    • Raul's avatar
      Raul
      Post Patron

      Ok, thank you Zubair_Muhammad but now, the total row is wrong:

       

       AbonoExpedientTotal
      AL55,0037,0092,00
      AM166,00 166,00
      AO157,002,75159,75
      GG113,5029,00142,50
      JB411,42 411,42
      JP117,7536,25154,00
      JS0,00 0,00
      MA0,00 0,00
      MG123,75 123,75
      RB0,00 0,00
      SR0,00 0,00
      TM0,00 0,00
       Total88120,088085,0096205,08

       

      Any idea?

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

        Hi Raul,

         

        Could you try using the formula below to create a new measure to see if it works? :smileyhappy:

        Measure = SUMX ( SUMMARIZE ( T2; T2[Type]; "abc"; [Hour] ); [abc] )
        

         

        Regards