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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Measure not filtering with ALLEXCEPT function

Hello,

 

I have a clustered columnchart with 2 measures. 1 measure I would like to be affected by a slicer, the other not.

The one I would like not to be affected:

Msr FgTotaal = 
var AValue = 
    LOOKUPVALUE( TblGespresteerdeUren[SumHours],TblGespresteerdeUren[MonthYear], SELECTEDVALUE(DateTable[Year-Month]))
return CALCULATE(
    DIVIDE([MsrAO] *1000000, AValue),
    (Fcttable)
)

with:

MsrAO = 
CALCULATE(
            COUNTROWS(Fcttable),
            Fcttable[TypeOfIncident] = "xxxx"
        ) 

The filter Fcttable[TypeOfIncident] = "xxxx" must be maintained. 

So I tried the following:

 

Msr FgTotaal = 
var AValue = 
    LOOKUPVALUE( TblGespresteerdeUren[SumHours],TblGespresteerdeUren[MonthYear], SELECTEDVALUE(DateTable[Year-Month]))
return CALCULATE(
    DIVIDE([MsrAO] *1000000, AValue),
    ALLEXCEPT(Fcttable,Fcttable[TypeOfIncident])
)

By doing this, the measure is not affected by the slicer. but also not by the filter Fcttable[TypeOfIncident] = "xxxx".

In other words: using ALLEXCEPT or ALL yields the same result.

 

Does anyone see what I'm missing here?

 

Thx in advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I found that ALLEXCEPT did work.  But it was also affecting the X-axis. So I had to add a second filter exception from the datetable.

Msr FgTotaal = 
var AValue = 
    LOOKUPVALUE( TblGespresteerdeUren[SumHours],TblGespresteerdeUren[MonthYear], SELECTEDVALUE(DateTable[Year-Month]))
return CALCULATE(
    DIVIDE([MsrAO] *1000000, AValue),
    ALLEXCEPT(Fcttable,Fcttable[TypeOfIncident], DateTable[Year-Month])
)

 grts

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Change this and check

 


Msr FgTotaal =
var AValue =
LOOKUPVALUE( TblGespresteerdeUren[SumHours],TblGespresteerdeUren[MonthYear], SELECTEDVALUE(DateTable[Year-Month]))
return CALCULATE(
DIVIDE([MsrAO] *1000000, AValue),
Filter(allselected(Fcttable),Fcttable[TypeOfIncident] = max(Fcttable[TypeOfIncident]))
)

 

 

allexcept will not allow any filter other than what is given in the allexcept (especially when used on fact)

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

I found that ALLEXCEPT did work.  But it was also affecting the X-axis. So I had to add a second filter exception from the datetable.

Msr FgTotaal = 
var AValue = 
    LOOKUPVALUE( TblGespresteerdeUren[SumHours],TblGespresteerdeUren[MonthYear], SELECTEDVALUE(DateTable[Year-Month]))
return CALCULATE(
    DIVIDE([MsrAO] *1000000, AValue),
    ALLEXCEPT(Fcttable,Fcttable[TypeOfIncident], DateTable[Year-Month])
)

 grts

 

Helpful resources

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