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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Select one row to not show total (show blank) or eliminate one in hierarchy

Hi, 
Have this matrix that I'm trying to build with possibility of drilling down twice. 
One of my row headers has the same name as the next level, which means that it is showing the total twice (see below for "Other")
I'm trying to think if there is a way to remove or hide the total in either one of my first to levels, so that the total will one show once.
Tried with conditional formatting, but could only figure out how to hide both totals, not just one.

Any god suggestions on how to solwe this?

PBISea_0-1612785795148.png

Thank you so much!

2 ACCEPTED SOLUTIONS

Do you mean something like this:

MeasureWithoutTotal3 = 
IF (
    OR(
        ISINSCOPE('Table'[status]), SELECTEDVALUE('Table'[Column1]) <> "Others"
    ),
    SUM(many[value]),
    BLANK()
    )

Hope that's it,


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

Happy to help!

LaDataWeb Blog

View solution in original post

v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please refer to my formulas.

v-lionel-msft_0-1613095442599.png

__Value = 
VAR x = SUM(many[value])
RETURN
IF(
    MAX('Table'[status]) = "Others" && HASONEFILTER('Table'[status]) = FALSE(),
    BLANK(),
    x
)
average = 
VAR x = AVERAGE(many[value])
RETURN
IF(
    MAX('Table'[status]) = "Others" && HASONEFILTER('Table'[status]) = FALSE(),
    BLANK(),
    x
)
count = 
VAR x = COUNT(many[id])
RETURN
IF(
    MAX('Table'[status]) = "Others" && HASONEFILTER('Table'[status]) = FALSE(),
    BLANK(),
    x
)

 

Best regards,
Lionel Chen

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

9 REPLIES 9
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please refer to my formulas.

v-lionel-msft_0-1613095442599.png

__Value = 
VAR x = SUM(many[value])
RETURN
IF(
    MAX('Table'[status]) = "Others" && HASONEFILTER('Table'[status]) = FALSE(),
    BLANK(),
    x
)
average = 
VAR x = AVERAGE(many[value])
RETURN
IF(
    MAX('Table'[status]) = "Others" && HASONEFILTER('Table'[status]) = FALSE(),
    BLANK(),
    x
)
count = 
VAR x = COUNT(many[id])
RETURN
IF(
    MAX('Table'[status]) = "Others" && HASONEFILTER('Table'[status]) = FALSE(),
    BLANK(),
    x
)

 

Best regards,
Lionel Chen

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

 

Anonymous
Not applicable

Perfetct! Thanks @v-lionel-msft 

ibarrau
Super User
Super User

Hi. I think you need DAX for this. I can't fiend a way to do it in formatting options. You will need a new Measure for the columns you want to hide and do something like this. Asuming the first column in the drilldown hierarchy's name is "ColumnStatus1"

MeasureWithoutTotal = 
IF (
    HASONEVALUE(Tabla[ColumnStatus1]),
    SUM(Table[Value]), //If value is a column instead of measure you can add it instead of the sum
    BLANK()
)

Hope that helps


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

Happy to help!

LaDataWeb Blog

Anonymous
Not applicable

hI @ibarrau and @amitchandak , thanks!
not 100% what I'm looking for unfortunately. I need to only show blank on the first level of my hierarchy for "Others", but still show value on that level for all the other. This means I need to do some sort of filtering or something to find the "Others" value in my column.

Hi. If the only row you don't want to show is Others, change the measure like the following assuming ColumnH1 means the first in hierarchy and ColumnH2 the second.

MeasureWithoutTotal = 
IF (
    OR(
        HASONEVALUE(Table[ColumnH2]) , SELECTEDVALUE(Table[ColumnH1]) <> "Others"
    ), 
    SUM(Table[Value]),
    BLANK()
)

Hope that helps

 


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

Happy to help!

LaDataWeb Blog

Anonymous
Not applicable

Hi @ibarrau, this is very close to what I'm looking for, but would like to show the total for either the first level or the second. I tried you formula and worked great removing both totals. Then I tried adding another OR function to see if I could include the next level aswell, but couldnt get that to work.
Ideally I would like it to look like this measurewithouttotal second from the right.

PBISea_0-1612881037034.png

I've added the pbix file here in case that's interesting. Thank you so much.


https://www.dropbox.com/s/7qxw78po0kb43zu/add%20column%20to%20one%20table.pbix?dl=0

Do you mean something like this:

MeasureWithoutTotal3 = 
IF (
    OR(
        ISINSCOPE('Table'[status]), SELECTEDVALUE('Table'[Column1]) <> "Others"
    ),
    SUM(many[value]),
    BLANK()
    )

Hope that's it,


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

Happy to help!

LaDataWeb Blog

Anonymous
Not applicable

Thank @ibarrau, this solve my problem! Unfortunately it seems that my total is removed from the measure, but guess I'll have to live with that.

amitchandak
Super User
Super User

@Anonymous ,  Try a mesure like

 

if(isinscope(Table[column1]) || isinscope(Table[column2]) , [count], blank())

 

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors