Forum Discussion

mshao's avatar
mshao
Icon for Helper III rankHelper III
2 years ago
Solved

Custom the subtotal name in Matrix

Hi Team,

 

I have original data like this:

I created a matrix in Power BI Desktop to show total value in SubType and Type  and all level. I put Type、SubType、ID in row and value in column, and I set the display of subtal then  I get this report:

But I want my report to show like this:

How can I achieve my goal? Do you guys have any idea? Thanks.

7 Replies

    • mshao's avatar
      mshao
      Icon for Helper III rankHelper III

      Thank you so much for your kindly reply, but that's too complicated and my case is not so complicated, is any simple way to achieve what I want?

      • Ritaf1983's avatar
        Ritaf1983
        Icon for Super User rankSuper User

         Hi mshao 
        That's the life of a developer: to create something simple, we have to put in a lot of effort 🙂

        Unfortunately, if you need to dynamically generate custom headings for subtotals I'm not aware of any other options.

         

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,Ritaf1983 

    thanks for your concern about this issue.

     

    Hi,mshao 

    I am glad to help you. 

     

    According to your description, you want to custom the subtotal name in Matrix? 

    If I understand you correctly, then you can refer to my solution. 

     

    I'm sorry to tell you that you will not be able to achieve this result by the method you described. Adding a new row to the hierarchy is not supported in Power BI. But you can use another method to get the result you want. 

     

    After importing the data into Power BI Desktop, you can use the matrix directly and change the value to Sum of Value to get the result you want. 

     

    Here are the test results, with totals for types A,B, and subtotals for their corresponding subtypes:

     

     

    I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.


    Best Regards,
    Fen Ling,


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

    • mshao's avatar
      mshao
      Icon for Helper III rankHelper III

      Thank you so much for your kindly reply, but that's no what I want, I want to get the custom subtotal name for different type.Do you have any idea?

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi, mshao 

        Unfortunately, I have not found a way to customize subtotal names for different types at this time.

         

        If you find a counterpart, please share your solution and also accept it as a solution. This will benefit members of the community who are experiencing the same problem as you to be able to find a solution quickly.

         

        I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
        Best Regards,
        Fen Ling,
        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.