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)) driver with 3 more incidents for specific cat and subcat.pbix (245.7 KB)
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 Employee ID , Incident ID, Category, and Subcategory .
Would you please help me to find out a solution for my struggle.
Grateful as always .
Hi @Iwona - Please find solution in attached file. Currently only Employee fulfilling the criteria is “6357639”. Can use “Num Employees with Incidents > 3_Id” measure to get the Employee ID’s fulfilling the condition.
Also, I am trying to find a way, how I can display employees meeting these requirements.
The second table would give me the expected Employee ID, all Incidents No, their categories, and subcategories.
Right now, those columns don’t correspond withc each other .
Hi @Iwona - Why didn’t you shared actual data earlier as I have to do double the effort now. Anyways
Issue was with the Category names as for example in earlier data it was “Collision - Minor” but now it is “Collision – Minor” (difference in -). I have modified it in new measure “Num_incidents_ankit_new” and also removed Date filter . If you need to add it then please do.
Regarding Second requirement, first table can only filter the second table to Location. You can apply a visual level filter on Second visual for this as done in my sample.
If there are any other issue, then request to mark this as close and raise a new post.
Hi @ankit,
I primarily posted my biggest locations with many people who have those heavy incidents. The last one is the one where my boss proved me wrong so I thought it will be easy to run your measures based on that one. Please accept my apologies for the confusion made by my logic. I recreated all your measures and adjusted them for new data to process - this was the easiest way to check.
Regarding PBI file, I have noticed :
number of employees is incorrect , there are many more than 3
Hi @Iwona - For 1st - It is for you to analyze why it is missing. I have already provided all the logic requested. Further, can make use of “Num Employees with Incidents > 3_Id_new” to get Employee Id’s that are included.
For 2nd - There is no filter applied for Category, Sub-Category on visual. They needs to be applied separately on visual.
Thank you for your quick answer, effort, and your time.
Sadly, I am unable to use your measures for mentioned requirements
Somehow, it doesn’t display all employees who should be visible based on the requirements.
@Iwona . The reason you are only getting 3 records is as I have taken the sample data of around 40 Rows and not the entire dataset. That’s why I asked you to do some analysis yourself since as per me logic is correct.
Purpose of the Forum is to provide/help with the logic, that is already done. Testing side or implementation shall be done by the user only.
Do mark this post as closed or keep it open but that’s all I can help on this.
For this particular case ( given a sample of 40 records) there are 4 people, not 3 who meet the requirements which means the result is incorrect.
I don’t know why the measures don’t capture all required cases. driver with 3 more incidents for specific cat and subcat_Ankit (2).pbix (261.4 KB)
I have added calculated columns purposely to distinguish desired categories and subcategories.
Once again, looking at 40 rows of the tab called 05_07_2023, there are 4 people ( 9820689, 9818601, 9502978, 9502018) with 3 and more incidents and they have in total of 21 incidents. Adding filter in filter pane ( last 12 completed periods didn’t help).
I decided to close this one and open new one with sample of 100 rows and drafted specific solution posted as well. Tis will be clear, precise and specific.
Hi @Iwona , i took quick look at your question and i tried to implement part of it at this moment. i provided screen shots below. let me know if thats what you need so i can provide more details. thanks