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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.