cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JoeTurtleMan
Regular Visitor

Measure to calculate an average count of rows based on work days value stored in another table

Hello,

 

I have a table containing workflows submitted along with the day they were made and the ID. It resembles this:

JoeTurtleMan_0-1685558224619.png

I have another table containing the work days (business days) for each month that looks like this:

JoeTurtleMan_1-1685558294652.png

I joined the tables on the Year-Month column.

 

What I would like is a count of IDs for each workflow divided by the amount of W_Days for that month. So in the above examples, Coverage would have a count of 2 divided by 20 work days for April producing an average of 0.10 per workday, and a count of 3 divided by 22 for May producing an avaerage of 0.14 per workday. Is there a measure I can create for this?

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @JoeTurtleMan ,

 

Data Model:

vrzhoumsft_0-1685687885900.png

Create a table visual by 'Work Day'[Month_Year] and 'Table'[Workflow].

Measure = 
VAR _COUNT = COUNT('Table'[ID])
VAR _WORKDAY = CALCULATE(SUM('Work Days'[W_Days]))
RETURN
DIVIDE(_COUNT,_WORKDAY)

Result is as below.

vrzhoumsft_1-1685687914329.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi @JoeTurtleMan ,

 

Data Model:

vrzhoumsft_0-1685687885900.png

Create a table visual by 'Work Day'[Month_Year] and 'Table'[Workflow].

Measure = 
VAR _COUNT = COUNT('Table'[ID])
VAR _WORKDAY = CALCULATE(SUM('Work Days'[W_Days]))
RETURN
DIVIDE(_COUNT,_WORKDAY)

Result is as below.

vrzhoumsft_1-1685687914329.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thank you! This worked. 

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors