cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BrentCo
Frequent Visitor

Calculating the number of occurrences in a week

Hi All,

 

I have been going around in circles with this requirement, so any help is appreciated.

 

I need to be able to calculate the number of occurrences a record occurances during a week.  I know I can do a simple count, however I also need to be able to determine if the occurrence happens once a week, or twice or more in a week.

 

Sample Data:

BrentCo_0-1649225809172.png

 

From the above, I want to be able to show that in Week 1, Employee 1 had 2 occurrences, and Employee 2 had 1 occurrence and so on.

 

Ultimately, showing # employees having 1 occurrence in a week, # employees having more that 2 occurances.

 

Thanks

Brent

 

 

1 ACCEPTED SOLUTION
rbriga
Super User
Super User

Try:

Occurrences=
COUNTROWS(TABLE)

When you add Employeenumber and Week as fields in a visual, it would give you the weekly occurrences for those employees.

-------------------------
Data analyst by day, hockey goalie by night.
Did I help? Then please hit that "kudos" or "accept as a solution" button!

View solution in original post

2 REPLIES 2
rbriga
Super User
Super User

Try:

Occurrences=
COUNTROWS(TABLE)

When you add Employeenumber and Week as fields in a visual, it would give you the weekly occurrences for those employees.

-------------------------
Data analyst by day, hockey goalie by night.
Did I help? Then please hit that "kudos" or "accept as a solution" button!
BrentCo
Frequent Visitor

Thanks so much.   Not sure why I didn't even think of that 😑

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors