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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.