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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Niak
Frequent Visitor

Hide some subcategories rows and keep others ?

Hello,
I have a problem for which I can't find a solution.

let me explain

I want to show for selected portfolio, the composition categorized by asset class.

I have 3 asset class : 

- Equity

-Bonds

-Cash

For equity only, I want to add a Subcategory to specify the geographical area.

Data are like that : 

Niak_2-1677189736924.png

 

 

 

For each "Asset class" and each "geographical area" I need the subtotal of "Amount in Euro" but not "unit Cost" (it is a nonsense to sum unit cost). 

and for Stocks name I need to see : "Unit Cost" and "Amount in Euro"

The result that I'm looking for is like that when I select Port1:

Niak_3-1677189800541.png

 

If I use the methode you describe, I will have something like this : 

Niak_4-1677190004259.png

 

The name will be at "geographic aera" level, that mean without unit cost. If I add unit cost for geographic aera it be added for Europe, US and international too and it's a nonsens. 

 

Thank you a lot for your help!

10 REPLIES 10
Len_Barr
Resolver I
Resolver I

This might be an obvious solution, so I'm sure you might have tried it already, but have you tried filtering out the visual based on the categories you don't want? Throw in your level 2 categories into the visual filter, then unclick whatever ones you want to hide

 

Niak
Frequent Visitor

@Len_Barr unfortunately it doesn't work because if I hide some subcategories I won't see the information contained in them anymore. I just want to hide the subcategory line but show the information

Greg_Deckler
Super User
Super User

@Niak So does you data look like this?

Category Sub1 Sub2 Value
ACTIONS Europe AIR LIQUIDE 12
ACTIONS International Something 5
LIQUIDITE   EUR 14
OBLIGATIONS   AXA S.D.H.Y.ZH.C3D 44


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler  yes, exactly like this !

@Niak Well, here's a thought, you could create 2 calculated columns (either in DAX or PQ) like below and use these in place of your current subcategory columns:

Sub1a Column = IF([Sub1] = BLANK(), [Sub2], [Sub1])

Sub2a Column = IF([Sub1] = BLANK(), BLANK(), [Sub2])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Thank you very much, this is very smart.

But in terms of display, there are still some problems because each asset is considered as a subtotal (specific formatting, not all columns present... adapted to subtotals but not to each asset)

 

CapturePb2.PNG

@Niak Are you saying that you want subtotals for the yellow marked areas?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Not really. 

I want exactly this without yellow line :

 

CapturePb.PNG

 

When I use your methode, some sub2 takes the place of sub1, so I have the format of sub1 for sub2 data and that's the probleme, because subtotals, bold, etc are not adapted to sub2 data. 

I hope it's clearer. 

Thank you for your help

@Niak I probably need more data to understand the full issue. I don't know what the calculations are for sub1 versus sub2 so I'm not sure of the full issue you are having.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler let me explain

I want to show for selected portefolio, the composition categorized by asset class.

I have 3 asset class : 

- Equity

-Bonds

-Cash

For equity only, I want to add a Subcategory to specify the geographical area.

Data are like that : 

Niak_2-1677189736924.png

 

 

 

For each "Asset class" and each "geographical area" I need the subtotal of "Amount in Euro" but not "unit Cost" (it is a nonsense to sum unit cost). 

and for Stocks name I need to see : "Unit Cost" and "Amount in Euro"

The result that I'm looking for is like that when I select Port1:

Niak_3-1677189800541.png

 

If I use the methode you describe, I will have somethink like this : 

Niak_4-1677190004259.png

 

The name will be at "geographic aera" level, that mean without unit cost. If I add unit cost for geographic aera it be added for Europe, US and internationnal too and it's a nonsens. 

 

Thank you a lot for your help!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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