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
pezakas
Helper I
Helper I

Measure to not count customer_Id if customer records have specific values in a field

Hello community, 

i have the following data:

 

1)Customer

cst_codecst_id_surrogateFirstNLastN
1151515        MikeJames
1151516        MikeJames
2161617        MariaKallas

2)Policy

Plc_IDPlc_id_surrogateClass
1000110101Health
1000110102Life
1000210103Health

3)Relational

cst_id_surrogatePlc_id_surrogate
15151510101
15151610102
16161710103

I want to create a measure that i can use as filter. All i need to get the customers who specific charasteristics.
In my case want to get ONLY the customer who dont have "Life" class. 
I expect only cst_code = 2 as a result

Thanks in advance

6 REPLIES 6
pezakas
Helper I
Helper I

Still not working as expected

pezakas
Helper I
Helper I

Still not working

Ahmedx
Super User
Super User

pls try this

Measure = 
COUNTX(FILTER(ALL('Policy'),'Policy'[Class]<>"Life"),[Plc_id_surrogate])

Hello and thanks for you fast reply. 
So how should i use this measure as filter?
Measure > 0  or?
Cause like this, doesnt look like it works.

pls try this

 

You can apply visual level filters
Measure = IF(
COUNTROWS(FILTER(ALL('Policy'),'Policy'[Class]<>"Life"))>=1,1)

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors