Forum Discussion

markpatton's avatar
markpatton
Icon for Helper I rankHelper I
4 years ago
Solved

Matrix or table with subtotal on one column

Hi,

 

This seems like it should be simple but I cannot find out how to do it  of even what to search for.

 

I have data that basically has a number of columns with one being the amount. I want to display as columns something like this

 

It does not have to look exactly like this. When I use a table of course I don't get the subtotals. When I use as a matrix the Invoice, LIne Description, Vendor and date show up as colapsable and hierarchal values in a single column. Matrix works ok but I want the fields displayed in separate columns and not hierarchical. 

 

Is there anyway to do this?

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi markpatton 

    Power BI doesn't support you to turn off total from column in value section. You see here I move Vender and Date into Value section in Matrix.

    I suggest you to add the columns as a level in rows section like before. Or you can create measures instead of adding columns in values section.

    Measures:

    M_Vendor = IF(HASONEVALUE('Table'[Line Description]),MAX('Table'[Vendor]),BLANK())
    M_Date = IF(HASONEVALUE('Table'[Line Description]),MAX('Table'[Date]),BLANK())

    Result is as below. In right side, above one is like before, below one is created by measure.

    Best Regards,
    Rico Zhou

     

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

     

8 Replies

  • Thanks, that gets me much closer to what I want. Is there anyway to remove totals for specific columns

     

    I would like to have the totals with a check mark but not the ones with an "X"

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi markpatton 

      Turn on "Per row level" function in "Subtotal" in Format, and then turn off the subtotal in the level which you don't need.

      Step 1:

      Step 2:

      Result is as below.

      Best Regards,
      Rico Zhou

       

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

      • markpatton's avatar
        markpatton
        Icon for Helper I rankHelper I

        Thanks, that works if the column is in the rows section but I have moved most of my columns that I don't want to total into the values section. I found that I could format the totals to be white on a white background to remove them but had to remove the alternating grey rows (in style) because I ended up with white text on grey background for alternating rows. Is there a solution like you mentioned for the values columns?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi markpatton 

    Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your problem.


    Best Regards,

    Rico Zhou