Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have master list of employees with joining date and relieving date, I have managed to calculate the Head count on any given day
with Measure [HC]=[Op]+[Joiners]-[Attrition] (Op: Opening Head count on that day), where [Op] [Joiners] and [Attrition] are measures.
Once I know the daily head count, I am trying to calculate Average Head count on YTD basis using the formula
AvgHC=Averagex(Datesytd('Date'(DateKey),[HC])
I am checking the result by month and measure is giving correct result for January but for other months it is ignoring the previous months data and calculating Average Head count for only the dates in that month.
Tried many types of filters still could not understand why it is happening. been scratching my head since two days.
Please help!!
Thanks in Advance
Solved! Go to Solution.
Hi @ashokr12,
Do you have a calendar table linked to your employee table?
Let us know in order to help.
Thx.
Hi @Interkoubess!
I have a calendar table, but did not link it to the employee table (I read somewhere that that way the table works on any date selected, so did not link it)
Thanks!
Hi @ashokr12,
You have to link them in order to use time intelligence functions.
I am not sure it will work if not.
Let us know if you connect them...
Thx. Ninter
Hi @Interkoubess!
I referred to this article, which recommends not to link the date table and employee table,
let me know what you think, Thanks!
Hi @inetguru
Followed your soultion and implemented it in my DAX. It is working!
Thanks a lot!!
Thanks @Interkoubess for taking interest in the problem!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
75 | |
68 | |
39 | |
35 |
User | Count |
---|---|
107 | |
56 | |
52 | |
48 | |
40 |