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
Anonymous
Not applicable

How to filter on individual rows in a matrix tabel

Hi,

I would like to build up a financial P&L based on a multiple dimension accounting system.

 

The problem is that I have some Group accounts like "unit cost", which includes only some of the departments, and another Group accounts like "overheads cost" which includes these departments. 

 

So the question is, is it possible to put a filter on individually rows in a matrix, so that I exclude single departments when looking at unit cost, but include them again when analyzing overheads cost?

 

A solution is to have two different matrix, but if it is possible to do different it could be cool 🙂     

  ActualsBudget VariansYear to date actualsYear to date budgetYear to date varians
        
Unitcost       
 Include Department x      
 Include Department y      
 Exclude Deparment Z      
        
Overheads      
 Include Department x      
 Include Department y      
 Include Deparment Z      
        

 

I hope you can help 🙂 

Søren 

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

Hi  , @Anonymous 

Here's my original data:

e5.PNG

First, I created another table:

 

Table = VALUES(Sheet1[Column2])

 

e4.PNG

Second, create measures:

 

Measure = 
VAR x =
CONCATENATEX(
    ALLSELECTED('Table'[Column2]),
    'Table'[Column2],
    ","
)
VAR y = 
FIND(
    MIN(Sheet1[Column2]),
    x,
    1,
    0
)
RETURN
IF(
    MAX(Sheet1[Column1]) = "Unitcost" && y > 0,
    0, 1
)

 

Third, set visual level filter:

e6.PNG

At last, you can get this:

e3.PNG

 

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

1 REPLY 1
v-lionel-msft
Community Support
Community Support

Hi  , @Anonymous 

Here's my original data:

e5.PNG

First, I created another table:

 

Table = VALUES(Sheet1[Column2])

 

e4.PNG

Second, create measures:

 

Measure = 
VAR x =
CONCATENATEX(
    ALLSELECTED('Table'[Column2]),
    'Table'[Column2],
    ","
)
VAR y = 
FIND(
    MIN(Sheet1[Column2]),
    x,
    1,
    0
)
RETURN
IF(
    MAX(Sheet1[Column1]) = "Unitcost" && y > 0,
    0, 1
)

 

Third, set visual level filter:

e6.PNG

At last, you can get this:

e3.PNG

 

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.

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors