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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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