cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

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:

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

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
Community Support

Data Model:

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.

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.

2 REPLIES 2
Community Support

Data Model:

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.

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.

Regular Visitor

Thank you! This worked.

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

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

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors