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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Count if conditions are met

Hello - 

 

Trying to do some demographics on projects.

 

Multiple projects with multiple individuals working on them spanning across different office locations (Department). 

 

I want to know how to identify how many projects have 2 or more (or 3 or more...4 or more) from the same office(department) working on them? I've created a table with just unique project ID's and i'd like to see a calculated column or something denoting if that project has 2/3/4 or more from same office working on it. Maybe even measures? Ideally, I'd get to see it by Employee type... Project support, Job captain etc... any help would be GREATLY appreciated.

Demographic data.PNG

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous ,

Try a new measure like


countx(filter(summarize(Table,Table[projectID], table[department],"_1", count(table[Name1])),[_1]>=2),[projectID])

Anonymous
Not applicable

Thank you @amitchandak 

 

Which relationships should I have active?/make active? I have my Name.1 relationship active.... as Table 'Active Employees' has the names and their locations. The 'Hours Distribution' table has all of the projects listed with the individuals.relationship - demo.PNG

edhans
Super User
Super User

COUNTX() is likely what you want as you can nest a FILTER() function to filter data by the table it needs, and it can have its own expression. But we would need actual data to play with. See links below.

 

How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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