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
DirkVr
Frequent Visitor

Matrix : hide lowest level rows

Hi all,

 

I have Organization Hierarchy of for instance 4 levels. Each organization unit has a type (Region or location). Regions can have subregions or locations. Locations can have sublocations (no subregions). 

Only locations can fill in checklists. In the datamodel I have a table for the organizationunits and a table for the checklists. In the checklist table I have defined several measures. 

We want to create matrix where we can see all regions/subregions but not the locations. In this matrix I want to show the calculated values of the different measures. 

When I create a matrix on the complete Organization Unit table and show the different measures and I filter out all organizationunits which are a location, then no values are shown for the matrix

Screenshot 2023-06-06 143238.png

I leave out the filter, the following is shown

region.png

Is it possible to show the image above, with without the "+" sign?

 

The datamodel looks as follows

DirkVr_0-1686055831779.png

Where this table contains the following data

DirkVr_1-1686055872779.png

The fact table looks like this

DirkVr_2-1686055906941.png

with the folllwing content

DirkVr_3-1686055956745.png

A few measures:

TotalCompleted =
VAR val = CALCULATE(COUNTROWS(FACT_PublishedChecklist), dim_qualitystatus[Status] = "Completed")
VAR EntityShowRow =
    [EntityBrowseDepth] <= [EntityRowDepth]
VAR Result =
    IF ( EntityShowRow, Val )
return Result
 
TotalWithExceptions =
VAR val = CALCULATE(COUNTROWS(FACT_PublishedChecklist), DIM_QualityStatus[Status] = "Completed with exceptions")
VAR EntityShowRow =
    [EntityBrowseDepth] <= [EntityRowDepth]
VAR Result =
    IF ( EntityShowRow, Val )
return Result
 
 
Total =
VAR val = COUNTROWS(fact_publishedchecklist)
VAR EntityShowRow =
    [EntityBrowseDepth] <= [EntityRowDepth]
VAR Result =
    IF ( EntityShowRow, Val )
return Result
 
 
CompletionScore = ([TotalCompleted]+[TotalWithExceptions])/[Total]
7 REPLIES 7
Greg_Deckler
Community Champion
Community Champion

@DirkVr Can you provide an example of how your actual data looks? Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

I have added some additional info in my original post

@DirkVr Thanks, that is helpful. So, if I am understanding things, sometimes the Level 2 might be location and sometimes it might be subregion? Is that correct?



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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

That is correct

@DirkVr There might be the answer to the issue. Your hierarchy is not what I would call a "proper" hierarchy. Would it be possible to reformat your data into a proper hiearchy where Level 1 is always Region, Level 2 always Subregtion, Level 3 ??? and Level 4 is Location?

 

Then you could simply put Level 1 and Level 2 into your matrix as an informal hierarchy and the problem should be solved.



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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

That is an issue. I am working in a multi-tenant environment where each tenant has its own hierarchy structure. Some tenants have 1 region and below that several locations. Other tenants have 1 region, subregions. Below subregions, that have locations and sublocations.

DirkVr
Frequent Visitor

Hi Greg,

 

You inspired me :-). I am working now a solution where I have 2 hierarchies. 1 for the regions, and 1 for the locations. I hope this will help 🙂

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.