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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
dofrancis3
Resolver I
Resolver I

Count with filter based on service colomns

Dear colleagues !

Please could you help me with DAX Mesure that can allow me to have number of each service

 

dofrancis3_0-1729078787391.png

 

1 ACCEPTED SOLUTION

Dear @dharmendars007 

Thank you for this proposition; but the Distinct Count should be based on the ID column insteand of service.

So, below is the solution:

 

Number of Mental Health =

CALCULATE(
DISTINCTCOUNT('GBV_Mapping_CAR'[ID]),
'GBV_Mapping_CAR'[Service] = "Mental health")
  
Number of familly =
CALCULATE(
DISTINCTCOUNT('GBV_Mapping_CAR'[ID]),
'GBV_Mapping_CAR'[Service] = "Familly")
 
Number of Legal Assistance =
CALCULATE(
DISTINCTCOUNT('GBV_Mapping_CAR'[ID]),
'GBV_Mapping_CAR'[Service] = "Legal Assistance")

View solution in original post

2 REPLIES 2
dharmendars007
Super User
Super User

Hello @dofrancis3 , 

 

Please try the below measures..

 

Number of Legal Assistance =
CALCULATE(
COUNT('Dataset'[Service]),
'Dataset'[Service] = "Legal assistance")

 

Number of Mental Health =
CALCULATE(
COUNT('Dataset'[Service]),
'Dataset'[Service] = "Mental health")

 

Number of Family =
CALCULATE(
COUNT('Dataset'[Service]),
'Dataset'[Service] = "Family")

 

If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes 👍 are much appreciated!

 

Thank You

Dharmendar S

LinkedIN 

Dear @dharmendars007 

Thank you for this proposition; but the Distinct Count should be based on the ID column insteand of service.

So, below is the solution:

 

Number of Mental Health =

CALCULATE(
DISTINCTCOUNT('GBV_Mapping_CAR'[ID]),
'GBV_Mapping_CAR'[Service] = "Mental health")
  
Number of familly =
CALCULATE(
DISTINCTCOUNT('GBV_Mapping_CAR'[ID]),
'GBV_Mapping_CAR'[Service] = "Familly")
 
Number of Legal Assistance =
CALCULATE(
DISTINCTCOUNT('GBV_Mapping_CAR'[ID]),
'GBV_Mapping_CAR'[Service] = "Legal Assistance")

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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