Forum Discussion

deb_power123's avatar
deb_power123
Icon for Helper V rankHelper V
5 years ago
Solved

How to exclude or hide a specific row subtotal in a Table Matrix visualization?

Hi All,

 

Can someone please suggest me how can I hide or exclude the subtotal of the row highlighted in red below from my table matrix in powerbi?

 

I just want to show %Occupied[marked in yellow] and remove the Total occupied row as [marked in red] as below expected output.

 

Is there a way to achieve it? or use RLS to hide the Total Occupied row from table matrix for all users? or any possible DAX. Please suggest.

 

Expected Output: I dont want to show the row marked in red and only i want to show the row marked in yellow in the subtotal in table matrix visual.

 

 

My input data is as below :-

 

Date  TotalSeats

  Occupied

  Seats

School NameBuildings
21-03-2021        10  1School1Building1
22-03-2021        10  4School1Building1
23-03-2021        10  4School1Building1
24-03-2021        10  1School1Building1
25-03-2021        10  2School1Building1
26-03-2021        10  1School1Building1
27-03-2021        10  1School1Building1
21-03-2021        12  5School1Building2
22-03-2021        12  8School1Building2
23-03-2021        12  8School1Building2
24-03-2021        12  3School1Building2
25-03-2021        12  4School1Building2
26-03-2021        12  2School1Building2
27-03-2021        12  4School1Building2
  • v-yingjl's avatar
    v-yingjl
    5 years ago

    Hi deb_power123 ,

    I'm afraid not. Font settings could only formatted in the Format pane and apply to the whole value fields instead of using conditional format.

    If the bold font is necessary, we could only adjust the font size as blod entirely under Values tab.

     

    Best Regards,
    Community Support Team _ Yingjie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

10 Replies

    • deb_power123's avatar
      deb_power123
      Icon for Helper V rankHelper V

      Hi amitchandak 

       

      Will the above DAX work for Grand Total and Row Total in PowerBI table matrix? Because i think blank will make the measure value empty.

       

      Is there any other way to remove the TotalOccupied row from table matrix view?Please suggest

  • v-yingjl's avatar
    v-yingjl
    Icon for Community Support rankCommunity Support

    Hi deb_power123 ,

    Currently in power bi the Value fields are shown in columns, not in rows, including the total value so that the row total value is only one row. You can create measures to hide the Occupied values in toal and change the total name:

    Occupied = 
    IF (
        HASONEVALUE ( 'Table'[Occupied seats] ),
        SUM ( 'Table'[Occupied seats] ) & " | "
            & SUM ( 'Table'[TotalSeats] ),
        BLANK ()
    )
    %Occupied = SUM ( 'Table'[Occupied seats] ) / SUM ( 'Table'[TotalSeats] )

    Attached a sample file in the below, hopes it could help.

     

    Best Regards,
    Community Support Team _ Yingjie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • deb_power123's avatar
      deb_power123
      Icon for Helper V rankHelper V

      Hi v-yingjl  Thankyou for your reponse, i will try your said approach .Since 21 March and 27 march 2021 are weekends or Saturdays , is there a way I can mark the weekends Saturday and sunday in Red and Bold font .

      so say I want to show 21 and 27 as red and bold font as highlighted below in yellow.Could you please suggest an approach to achieve it?

       

      • v-yingjl's avatar
        v-yingjl
        Icon for Community Support rankCommunity Support

        Hi deb_power123 ,

        Currently we can just set the font color by conditional format. Create a measure like this:

        Format =
        IF (
            WEEKDAY ( MAX ( 'Table'[Date] ), 2 ) = 6
                || WEEKDAY ( MAX ( 'Table'[Date] ), 2 ) = 7,
            "red"
        )
        

        Apply it for the previous two measures in conditional format:

         

        Best Regards,
        Community Support Team _ Yingjie Li
        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • deb_power123's avatar
      deb_power123
      Icon for Helper V rankHelper V

      Hi v-yingjl   Sorry for late reply.

       

      1) Could you please suggest if we can order the dates in descending format in the .pbix file you sent me? Please suggest. At the moment it is in the ascending format of dates. It should be in order 27 March ,26March.....21 March 2021  :-

       

      2) Also is there any property to align the values for occupied and % occupied to the extreme left of the grid boxes so that it looks more aligned.If you see now we have some spaces in the left , i want to move it to extreme left , how can i do it?