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! Learn more

Reply
JoseLuisAGZZ
Helper I
Helper I

Count and filter

Hello everybody

 

Im trying to count the number of employees (thats the first column) but i have no idea how to do it, in the table I have a measure that counts by a criterion, I use this formula so I can count the days that some person have been incapacitated, but also need the number of employees the count of the first coulmn but i have no clue on what to do
CALCULATE(
                    COUNT( Employee Number),
                                   CriteriaColumn = Criteria 1 || CriteriaColumn = Criteria 2)

any help would be appreciated
Thanks in advance


JoseLuisAGZZ_0-1629741027697.png

 

3 REPLIES 3
v-chenwuz-msft
Community Support
Community Support

Hi @ JoseLuisAGZZ,

 

According to your description, you want to calculate how many unique employees appear for this criteria.

 

Try this measure

Measure 1 =

CALCULATE(

         DISTINCTCOUNT('Table'[EmployeeNumber]),

         FILTER('Table','Table'[CriteriaColumn]="CRITERIA")

)

 

Best Regards!

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@JoseLuisAGZZ ,The information you have provided is not making the problem clear to me. Can you please explain with an example.
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

We have a database where we collect daily information about all our employees and theres a column called criteria and in this column we have more than 10 criteria to choose from, but im doing a report for just one specific criteria

So what im doing first its to count all the times this specific criteria appears for each of our employees with the next measure

CALCULATE(
                    COUNT( Employee Number),
                                   CriteriaColumn = Criteria 1 || CriteriaColumn = Criteria 2)

 

whit this we can see how many times in the month a person have this criteria, but now I need to display a card where I can see how many unique employees appear for this criteria
Ive tried with 

CALCULATE(DISTINCTCOUNT), CRITERIA COLUMN = 'CRITERIA')

but its not working

so if you have an idea on how to calculate that, i would appreciate it so much

 

Helpful resources

Announcements
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!

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