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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Tlotly
Resolver II
Resolver II

AllExcept function

Good day

 

I have a matrixbelow. When I select a zone on a slicer for example (Chris Hani), I don't want the region details to change. 

 

Meaning if I put in more levels onto the matrix, the upper level should not change when I filter lower levels.  Is this possible to achieve? I've been searching on the internet and cannot find similar issues.

 

I tried creating a measure using AllExcept but I'm not getting desired results. The measure does not even give me the correct results.

 

correct measure:  CALCULATE(count('Drop-Out details'[retention_status]))

correct matrix:

Tlotly_5-1683281593972.png

 

With AllExcept measure: 

var _nonfilter = CALCULATE(count('Drop-Out details'[retention_status]),
ALLEXCEPT ('Drop-Out details','Drop-Out details'[region_description],'Drop-Out details'[zone_description]))
var _normal = CALCULATE(count('Drop-Out details'[retention_status]))
return
if(SELECTEDVALUE('Drop-Out details'[zone_description]) <> BLANK() , _nonfilter, _normal)

before zone filter

Tlotly_3-1683280906015.png

 

zone filter

Tlotly_2-1683280781080.png

 

after zone filter

Tlotly_4-1683281305070.png

 

Thank you in advance.

 

2 REPLIES 2
Mahesh0016
Super User
Super User

@Tlotly please try below code
Measures =
VAR _nonfilter =
CALCULATE (
COUNT ( 'Drop-Out details'[retention_status] ),
ALL (
'Drop-Out details'[region_description],
'Drop-Out details'[zone_description]
)
)
VAR _normal =
CALCULATE ( COUNT ( 'Drop-Out details'[retention_status] ) )
RETURN
IF ( ISINSCOPE ( 'Drop-Out details'[zone_description] ), _nonfilter, _normal )


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

@Tlotly THANK YOU!!

@Mahesh0016 thank you. It still doesn't work. Maybe I have to make separate datasets by region, zone etc..

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors