Skip to main content
cancel
Showing results for 
Search instead 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

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
Fabric Community Conference

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.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

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