Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Average by row in a matrix

Hi,

i have a matrix with 3 row(Supplier,Order Number,Item) and different values, so i can drill down 3 times.                  

Supplier                         

     Order Number      

         Item                    

 

I need to average a comlumn value for every matrix row. So if i drill down i will see a different value.

 

Is it possibile? How can i do that?

 

Thanks

  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi,

    thanks for help.

     

    I forgot to change data type from text to number. So average didn't work.

    Get it =

    CALCULATE(SUM(PRC_VENDPACKINGSLIPTRANS[GG Pos]);ALLSELECTED(PRC_VENDPACKINGSLIPTRANS[GG Pos]))/ COUNT(PRC_VENDPACKINGSLIPTRANS[GG Pos])
     
    It seems work but i will take a look to your post!
     
    Thanks

2 Replies

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Anonymous ,

     

    You should consider using ISINSCOPE to judge what kind of context the measure (Avg) is under, and use ALLSELECTED to restrain the context in the iterative calculation.

    Here is an example showing how to Create a Dynamic Rank in Matrix with Hierarchy

     

    Best regards,

    Yuliana Gu

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,

      thanks for help.

       

      I forgot to change data type from text to number. So average didn't work.

      Get it =

      CALCULATE(SUM(PRC_VENDPACKINGSLIPTRANS[GG Pos]);ALLSELECTED(PRC_VENDPACKINGSLIPTRANS[GG Pos]))/ COUNT(PRC_VENDPACKINGSLIPTRANS[GG Pos])
       
      It seems work but i will take a look to your post!
       
      Thanks