Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Alltasks_Chris
Frequent Visitor

Display column subtotal for Row Subtotal without the other rows

Hi,

 

I have found some posts that are kind of the inverse of my question but I haven't found an answer to this and maybe there isn't one. Can anyone help me I have row and column subtotals on for a Table I'm working on and I only want to see column subtotals specifically for the Row Subtotals.

 

Like this: 

Alltasks_Chris_0-1611177057066.png

Is there a way to make that happen?

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @Alltasks_Chris ,

 

You can try this measure

 

Measure = 
VAR tt =
    IF ( HASONEFILTER ( 'Table'[Category1] ),"RESULT")
RETURN
    IF (
        ISBLANK ( tt ) && HASONEFILTER ( 'Table'[Category2] ),
        BLANK (),
        SUM ( 'Table'[Value] )
    )

 

Screenshot 2021-01-25 110356.png 

Here are some explanations:

HASONEFILTER CATEGORY1 measure is to turn Column subtotals into null values. HASONEFILTER CATEGORY2 measure is to distinguish Row Subtotal in Column subtotals from other rows.

Screenshot 2021-01-25 110512.png

Screenshot 2021-01-25 110524.png

 

You can check more details from here.

 

 

Best Regards,

Stephen Tao

 

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

View solution in original post

6 REPLIES 6
v-stephen-msft
Community Support
Community Support

Hi @Alltasks_Chris ,


Sorry to disturb you...


But did I answer your question ? Please mark my reply as solution. Thank you very much.

 

Best Regards,
Stephen Tao

v-stephen-msft
Community Support
Community Support

Hi @Alltasks_Chris ,

 

You can try this measure

 

Measure = 
VAR tt =
    IF ( HASONEFILTER ( 'Table'[Category1] ),"RESULT")
RETURN
    IF (
        ISBLANK ( tt ) && HASONEFILTER ( 'Table'[Category2] ),
        BLANK (),
        SUM ( 'Table'[Value] )
    )

 

Screenshot 2021-01-25 110356.png 

Here are some explanations:

HASONEFILTER CATEGORY1 measure is to turn Column subtotals into null values. HASONEFILTER CATEGORY2 measure is to distinguish Row Subtotal in Column subtotals from other rows.

Screenshot 2021-01-25 110512.png

Screenshot 2021-01-25 110524.png

 

You can check more details from here.

 

 

Best Regards,

Stephen Tao

 

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

lbendlin
Super User
Super User

Keep in mind that measures are computed for each cell of your visual, including the individual values, the column subtotals, the row subtotals and the grand total.  Construct your measure accordingly.

Alltasks_Chris
Frequent Visitor

I have tried various variations of hiding and showing column and row subtitles but I always either get none of the column subtotals or all of them not the specific ones. I'll take a look at isinscope though that may do what I'm after and get back to you. Thanks for the response.

I've taken a look at isincope and I can't make heads or tails of it. 

 

I have a Table with two Values in Rows to give me the dates and the categories for each date

then the columns I'm showing ticket sale information per event which is 4 values the event date, city, venue and sellable capacity. The values are my ticket sales figures and I just want a total of all totals across all events for that day to show on the far right. I'm quite new to powerBI so my dax experience/ understanding is pretty limited.

amitchandak
Super User
Super User

@Alltasks_Chris , One very clear. You have options to hide subtotals in matrix. 

 

Also isinscope can help to change behaviour of column. Here you might have check for row column isinscope true and columns's column isinscope false

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.