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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
vijayvizzu
Helper III
Helper III

Double Filter

I have created a measure to count the carry overs (previous month values on selected month). The results are working fine, but i want to apply one more filter to exclude the rows which contains the words "ABC" or "DEF".

 

Below is the current measure which gives me total count, including ABC and DEF

How can i fitler the values excluding the above criteria

 
CarryOver =
VAR CarryoverCount =
CALCULATE(
COUNT('Forwarder Details'[Carry Over]),
PREVIOUSMONTH( calTable[Date] )
)

RETURN
CarryoverCount
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @vijayvizzu ,

Please update the formula of measure as below and check whether it can get the correct result. You can find the attachment for the details.

Measure =
VAR CarryoverCount =
CALCULATE (
COUNT ( 'Forwarder Details'[Carry Over] ),
PREVIOUSMONTH ( calTable[Date] ),
FILTER (
ALL ( 'Forwarder Details' ),
NOT ( 'Forwarder Details'[Custom] IN { "ABC", "DEF" } )
)
)
RETURN
CarryoverCount

yingyinr_0-1626244820963.png

Best Regards

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@vijayvizzu , Try like

 

CarryOver =
VAR CarryoverCount =
CALCULATE(
COUNT('Forwarder Details'[Carry Over]),
PREVIOUSMONTH( calTable[Date] ),
filter('Forwarder Details', not('Forwarder Details'[column] in {"ABC" , "DEF"}))
)

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

@amitchandak Thanks for your support,  i modified the measure, but it doesn't gives any values (blank)

 

VAR CarryoverCount =
CALCULATE(
COUNT('Forwarder Details'[Carry Over]),
PREVIOUSMONTH( calTable[Date] ),
FILTER(
'Forwarder Details',
NOT( 'Forwarder Details'[Custom] in {"ABC","DEF"})
)
)

RETURN
CarryoverCount
Anonymous
Not applicable

Hi @vijayvizzu ,

Please update the formula of measure as below and check whether it can get the correct result. You can find the attachment for the details.

Measure =
VAR CarryoverCount =
CALCULATE (
COUNT ( 'Forwarder Details'[Carry Over] ),
PREVIOUSMONTH ( calTable[Date] ),
FILTER (
ALL ( 'Forwarder Details' ),
NOT ( 'Forwarder Details'[Custom] IN { "ABC", "DEF" } )
)
)
RETURN
CarryoverCount

yingyinr_0-1626244820963.png

Best Regards

@vijayvizzu ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

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.