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

Filtering a MAtrix table on sublevel vlaue

Hi all,

 

I have dax question.

I would like to filter my Matrix table based on the value of a sublevel.

Current Set up: 
Level 1 : ParentAccount

Level 2: Account

Level 3: Contract

 

I created a Delta measure that calculates the difference between 2 selected dates. 
"P1" & "P2".

Next I would like the filter my rows based on the value of Account! If Delta of Account = 0 then it shouldn't show. 
This is where I'm stuck. Anyone an Idea how I can filter this Matrix? 

Robin666_0-1614941459654.png

as an example, this line should not show.

 

Robin



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

Hi, @Anonymous 

According to your description, I can understand what you want to achieve, you want to make the rows that Delate is 0 and is in the scope of [ParentAccount] to disappear in the Matrix, right? You can try my steps:

This is my test data based on your Matrix:

v-robertq-msft_0-1615188409979.png

 

I created these two measures:

Delta = SUMX('Table',[P2]-[P1])
Flag =

IF(

    ISINSCOPE('Table'[Parent Account]),

    IF(

        [Delta]=0,0,1),1 )

Then I created a Matrix and place it like this:

v-robertq-msft_1-1615188410032.png

 

As you can see, the row in which Delta is 0 can still appear in the Matrix.

Then I apply a filter to this Matrix, like this:

v-robertq-msft_2-1615188410036.png

 

Then the row disappeared, and you can get what you want.

You can download my test pbix file here

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

 

Best Regards,

Community Support Team _Robert Qin

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

2 REPLIES 2
v-robertq-msft
Community Support
Community Support

Hi, @Anonymous 

According to your description, I can understand what you want to achieve, you want to make the rows that Delate is 0 and is in the scope of [ParentAccount] to disappear in the Matrix, right? You can try my steps:

This is my test data based on your Matrix:

v-robertq-msft_0-1615188409979.png

 

I created these two measures:

Delta = SUMX('Table',[P2]-[P1])
Flag =

IF(

    ISINSCOPE('Table'[Parent Account]),

    IF(

        [Delta]=0,0,1),1 )

Then I created a Matrix and place it like this:

v-robertq-msft_1-1615188410032.png

 

As you can see, the row in which Delta is 0 can still appear in the Matrix.

Then I apply a filter to this Matrix, like this:

v-robertq-msft_2-1615188410036.png

 

Then the row disappeared, and you can get what you want.

You can download my test pbix file here

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

 

Best Regards,

Community Support Team _Robert Qin

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

amitchandak
Super User
Super User

@Anonymous , isinscope and checking value should help

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

 

if( isinscope(Table[account]) && Max(Table[account]) = "Abc", [Measure1], [measure2])

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
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.