'How can I count the number of occurrences on power pivot?

I have this table Employee ID, Absence type, start date, end date, index, occurrences

enter image description here

I don't know how to create the DAX so it gives me the number of absence occurrences for an employee id, I'm using power pivot but if this is doable on power query let me know please!

Thank you



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source