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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.