Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am working on a HC Report and i am displaying HC count per month as you can see in Attached Image.
For Regular employess from Nov to december there is an increease of 2 employees (77 - 79).
Write now i made a drillthrough on employee count so that when the user drillthrough from november he sees 77 employee name and when he drill through from december he is seeing 79 Employee names.
i want to show the 2 new employee name, when either the user hover over december or user drillthrough on december(79).
I am struggling with the dax Measure to show the change in employee number . Could Someone help me with the measure?
This is the measure written for HC count
Employee Count =
var EmpCount = CALCULATE (
SUM ( 'HC DATA'[Count] ),
'HC DATA'[Period] = MAX ( 'HC DATA'[Period] )
)
I am struggling with the dax Measure to show the change in employee number . Could Someone help me with the measure?
Solved! Go to Solution.
Hi , @mikekim123
According to your requirements description, you want to implement in the matrix the difference between the current month's employee count and the previous month's employee count under the grouping of 'Emplopyee' [D/E/F Parent MU] to get the number of new employees, and you want to write a measure implementation through DAX expressions, right?
Based on my tests, you can refer to my solution ideas:
Here is my test data:
You can create such a measure:
Count difference =
var _lastmonthcount=CALCULATE(COUNT(Emplopyee[Emplopyee name]),FILTER(ALL('Emplopyee'),'Emplopyee'[Date]>EOMONTH(MIN('Emplopyee'[Date]),-2)&&'Emplopyee'[Date]<EOMONTH(MIN('Emplopyee'[Date])&&'Emplopyee'[D/E/F Parent MU]=MAX('Emplopyee'[D/E/F Parent MU]),-1)+1))
return
COUNT(Emplopyee[Emplopyee name])-_lastmonthcount
Then add the measure to the corresponding visual to check if it meets your requirements:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , @mikekim123
According to your requirements description, you want to implement in the matrix the difference between the current month's employee count and the previous month's employee count under the grouping of 'Emplopyee' [D/E/F Parent MU] to get the number of new employees, and you want to write a measure implementation through DAX expressions, right?
Based on my tests, you can refer to my solution ideas:
Here is my test data:
You can create such a measure:
Count difference =
var _lastmonthcount=CALCULATE(COUNT(Emplopyee[Emplopyee name]),FILTER(ALL('Emplopyee'),'Emplopyee'[Date]>EOMONTH(MIN('Emplopyee'[Date]),-2)&&'Emplopyee'[Date]<EOMONTH(MIN('Emplopyee'[Date])&&'Emplopyee'[D/E/F Parent MU]=MAX('Emplopyee'[D/E/F Parent MU]),-1)+1))
return
COUNT(Emplopyee[Emplopyee name])-_lastmonthcount
Then add the measure to the corresponding visual to check if it meets your requirements:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly