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
alpeytongreene
Helper II
Helper II

Monthly Average of Employees YTD/Rolling12

Hello! I am working on a turnover report that will become a rolling 12 month report after January. I have lists of all of our employees for the first and last day of each month. 

 

I need the table to show the monthly average (currently only carrying over the one month information). This is this information in the table. 

Location --> Department --> Job Title -->Count and Calculations for Monthly Terms and FTE Reductions. All of the data for which employee is in the month is in one spreadsheet and is added to monthly. It is separated out by a column for Date which includes the first and last date for each month. 

 

Anyone know how to get the average to calculate right? 

 

I have tried separating them out and uploading them that way but it shows each month as a count in the table so January would show all the other months as well. 

 

I have connected this information to a date table as well to attempt to make the count easier. 

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

Hi, 

According to your description, I can roughly understand your requirement, you want to get the Rolling 12 monthly average of the sales month of the employees in your company, right? I think you can try this measure:

This is the test data I created based on your description:

vrobertqmsft_0-1638415770909.png

Rolling 12 monthly average =

CALCULATE (

    AVERAGE ( 'Table'[Sales] ),

    FILTER (

        ALL ( 'Table' ),

        [Employee] = MAX ( 'Table'[Employee] )

            && [Date] > EOMONTH ( MAX ( 'Table'[Date] ), -13 )

            && [Date] <= EOMONTH ( MAX ( 'Table'[Date] ), 0 )

    )

)

 

And you can create a table chart to place like this to get what you want.

vrobertqmsft_1-1638415770917.png

 

You can download my test pbix file below

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

3 REPLIES 3
v-robertq-msft
Community Support
Community Support

Hi, 

According to your description, I can roughly understand your requirement, you want to get the Rolling 12 monthly average of the sales month of the employees in your company, right? I think you can try this measure:

This is the test data I created based on your description:

vrobertqmsft_0-1638415770909.png

Rolling 12 monthly average =

CALCULATE (

    AVERAGE ( 'Table'[Sales] ),

    FILTER (

        ALL ( 'Table' ),

        [Employee] = MAX ( 'Table'[Employee] )

            && [Date] > EOMONTH ( MAX ( 'Table'[Date] ), -13 )

            && [Date] <= EOMONTH ( MAX ( 'Table'[Date] ), 0 )

    )

)

 

And you can create a table chart to place like this to get what you want.

vrobertqmsft_1-1638415770917.png

 

You can download my test pbix file below

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

This is perfect- Thank you. Apologies for a late response. Illness had me on the sidelines. 

VahidDM
Super User
Super User

Hi @alpeytongreene 

 

Can you post sample data as text and expected output?
Not enough information to go on;

please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
4. Relation between your tables

Appreciate your Kudos!!
LinkedIn:www.linkedin.com/in/vahid-dm/

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.

Top Solution Authors