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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Ivonka
New Member

Count of employees with several conditions

Hi all,

I am trying to prepare a report which shows employees with 3 or more incidents -
( (Incidents included are: Collision, Collision – Major, Collision – Minor, Passenger Injury, Passenger Incident (slip, trip, fall))
PBI file attached here : 

https://forum.enterprisedna.co/t/count-of-employees-with-several-conditions/43365 

This measure doesn’t give me any outcome. Other attempts don’t even capture correct data.
Drivers with 3+ Incidents =
CALCULATE(
DISTINCT COUNT(‘FACT_INCIDENT’[EMPLOYEE_ID]),
FILTER(
ALL(‘FACT_INCIDENT’),
‘FACT_INCIDENT’[OP_DATE] >= TODAY() - 365 &&
(
‘FACT_INCIDENT’[CATEGORY] = “Collision” ||
‘FACT_INCIDENT’[CATEGORY] = “Collision - Major” ||
‘FACT_INCIDENT’[CATEGORY] = “Collision - Minor” ||
‘FACT_INCIDENT’[CATEGORY] = " Passenger Injury"||
(
‘FACT_INCIDENT’[CATEGORY] = “Passenger Incident” &&
‘FACT_INCIDENT’[SUB_CATEGORY] = “Slip/Trip/Fall”
)
) &&
CALCULATE(
COUNT(‘FACT_INCIDENT’[INCIDENT_NO]),
‘FACT_INCIDENT’[OP_DATE] >= TODAY() - 365
) >= 3
)
)

I need to achieve two tables:
first table with Location, number of employees ( with 3+ inc), and number of exact incidents for everyone
the second table should store the location of Employee ID, Incident ID, Category, and Subcategory.

Would you please help me to find out a solution for my struggle?
Grateful as always.

Iwona

0 REPLIES 0

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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