Forum Discussion

soji's avatar
soji
Frequent Visitor
5 years ago

Issue with Matrix Visualization

Hi 

 

I have created a Matrix View in Power BI table as i wanted dynamic output based on the weeks selection. Here everything is working as i wanted except the Total - i need the average instead of total as highlighted in yellow colour. Can you please help.

 

Thanks

Soji

 

5 Replies

  • soji's avatar
    soji
    Frequent Visitor

    Hi Amit,

     

    I have manually added the average in the sample data which i shared but in BI i am getting total instead of average.

    Thanks

     

    • amitchandak's avatar
      amitchandak
      Super User

      soji , Assume you have sum measure

      the create  measures 

      average measure 1= [sum measure]/distinctcount(Table[Week])
      average measure 2= [sum measure]/distinctcount(Table[emirate])

       

       

      and use below measure in matrix

      Switch( True() ,
      isfiltered(Table[Week]) && not( isfiltered(Table[Emirate])) ,[average measure 1],
      not(isfiltered(Table[Week])) || isfiltered(Table[Emirate]) ,[average measure 2],
      [sum measure]
      )

       

  • soji's avatar
    soji
    Frequent Visitor

    Thanks for all responses.

     

    I have managed to find the solution by creating a quick measure for the average.

     

  • wdx223_Daniel's avatar
    wdx223_Daniel
    Community Champion

    =averagex(summarize(Factable,table[Emirate],DateTable[Week]),[Amount])