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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Kavya_2001
Regular Visitor

Count records from Direct query table excluding records which are available in import mode table

Hello Everyone,
Greetings,

I have below two tables
1. Fact_stores table with has columns Storeid, Storelocation, Zipcode - (Direct Mode )

2. Exclude_stores table which has Storeid column - (Import Mode)

Need to create a measure which calculates the count of storeid's from Fact_stores excluding storeid from Exclude_stores table

1 ACCEPTED SOLUTION
Abhilash_P
Kudo Kingpin
Kudo Kingpin

Hi @Kavya_2001 ,
You can create a measue as below

CALCULATE (
COUNT(Fact_stores[Storeid]),
    KEEPFILTERS (
        NOT 'Fact_stores'[Storeid] IN VALUES ('Exclude_stores'[Storeid])  
    )
)

Let me know if these measure works
Thanks

View solution in original post

1 REPLY 1
Abhilash_P
Kudo Kingpin
Kudo Kingpin

Hi @Kavya_2001 ,
You can create a measue as below

CALCULATE (
COUNT(Fact_stores[Storeid]),
    KEEPFILTERS (
        NOT 'Fact_stores'[Storeid] IN VALUES ('Exclude_stores'[Storeid])  
    )
)

Let me know if these measure works
Thanks

Helpful resources

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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