Forum Discussion

VladyOselsky's avatar
VladyOselsky
Frequent Visitor
3 years ago
Solved

Need help setting up Matrix

Hello,   I'm not sure if there is functionality in defaul visual to achive the following. I have setup measures to Calculate Sales Total, Sales Quantity and other related information. After that I ...
  • v-yueyunzh-msft's avatar
    3 years ago

    Hi , VladyOselsky 

    According to your description, you want to convert the Matrix visual , do you mean you want to make this:

    If this , you can create a dimension table 'table 2' like this:

     

    Then we can create a measure based on youe second measure :

    Measure = 
    var _type =  MAX('Table 2'[Column1])
    return
    IF(_type = "Sales Total" ,  SUMX( VALUES('Table'[Categories]) , [Sales Total]) , IF( _type="Sales Quanity" , SUMX( VALUES('Table'[Categories]) , [Sales Quantity])))

     

    The result is as follows:

     

     

    If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

    Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

     

    Best Regards,

    Aniya Zhang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly