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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
av9
Helper III
Helper III

Filter data in heirachy

I am trying to filter data in this table so any customer above 15% should show only.

 

I am having troubles creating a filter that allows me to filter at this level and keep the account rows under them when the account rows are less than 15% but add to greather than 15% on a customer level.

 

As example Customer 1 is totalled 16% but because the accounts are both only 8% these rows are getting filtered out.

 

av9_0-1650638690710.png

 

% Sales = DIVIDE([Total Sales], CALCULATE([Total Sales], All(Customer), All (Account)))

 

Any help would be great.

1 ACCEPTED SOLUTION

Still doesnt quite sort it out. Its ok I have managed to find a way to do it.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

HI, 

you can use ISINSCOPE() function to work on the hierarchy level that you're interested in.

Here's the guide: Distinguishing HASONEVALUE from ISINSCOPE - SQLBI

amitchandak
Super User
Super User

@av9 , create a measure like this and use visual level filter

 

% filter Sales = calculate(DIVIDE([Total Sales], CALCULATE([Total Sales], all())), allexcept(table, Table[customer]))

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

Its creating the visual level filter thats the issue. Seems to always not include the 3rd level in heirarchy (Account)

 

av9_0-1650935564450.png

 

You can try something like below which will calculate the percentage on the account level.

Account % =
CALCULATE ( [% Measure], ALLEXCEPT ( tbl, tbl[account] ) )




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Still doesnt quite sort it out. Its ok I have managed to find a way to do it.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.