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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

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
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.