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
sraizada
Frequent Visitor

Calculating month data from year data

Hi all,

 

I have a table with active headcount and terminations in one data set. It is an appended table from three year end snapshots. Based on this, I have calculated the average headcount and monthly terminations

Measure 1: AverageHeadcount =
var Heacount2018=[Headcount 2018]
var Headcount2019= [Headcount 2019]
var Headcount2020=[Headcount 2020]
return
VariableTable[AvgHeadcount]
Measure 2: 
MonthlyTerminations =
var Termination2018=MeasureTable[2018MonthlyCumlulativeTerminations]
var Termination2019= MeasureTable[2019MonthlyCumlulativeTerminations]
var Termination2020=MeasureTable[2020MonthlyCumlulativeTerminations]
return
VariableMonth[Terminations]
 
From this, I want to create a measure which will give me average headcount and monthly termination for a particular month.
 
I need to create 3 variables:
 
1. Variable or measure for average headcount - it takes the average of beginning year headcount and the latest month end headcount.
2. Variable or measure for monthly terminations which will basically filter out the variable for yearly terminations for that particular month and year
3. Variable or measure to average headcount for a particular month and year. (basically a filter of variable or measure month)
Any ideas on how to go about it? My data model has no relationships
 
Appreciate all your suggestions
 
thank you!
2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

Looking at this information , difficut to tell. Share a sample data and sample out. But if you data inf the format mentioed in my HR blog can get those easily.

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

View solution in original post

v-diye-msft
Community Support
Community Support

Hi @sraizada 

 

you might consider creating pbix file that will contain some sample data (remove the confidential info), upload the pbix to onedrive or dropbox and share the link to the file. Please do not forget to describe the expected results based on this sample data.

 

Community Support Team _ Dina Ye
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-diye-msft
Community Support
Community Support

Hi @sraizada 

 

you might consider creating pbix file that will contain some sample data (remove the confidential info), upload the pbix to onedrive or dropbox and share the link to the file. Please do not forget to describe the expected results based on this sample data.

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
amitchandak
Super User
Super User

Looking at this information , difficut to tell. Share a sample data and sample out. But if you data inf the format mentioed in my HR blog can get those easily.

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

Greg_Deckler
Super User
Super User

I suggest you post sample/example data and your expected result! 🙂 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


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.