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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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