Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I am trying to calculate the headcount from a worksheet named - Master_Active2 and the slicer is applied the time period from a worksheet named - Master_In_Out.
As a result, i cannot find the correct headcount from the below formula:
Could you help to let me know what would be the reason behind? Thanks.
Solved! Go to Solution.
@Nicolachan0416 , Try using
Headcount =
CALCULATE(
COUNT(Master_Active2[Subsidiary Employee ID]),
USERELATIONSHIP(Master_Active2[Period_Month], Master_In_Out[Period_Month]),
FILTER(
Master_In_Out,
Master_In_Out[Period_Year] = SELECTEDVALUE(Master_In_Out[Period_Year])
)
)
Proud to be a Super User! |
|
Hi @Nicolachan0416 ,
Whether the advice given by bhanu_gautam has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please
provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Neeko Tang
@Nicolachan0416 , Try using
Headcount =
CALCULATE(
COUNT(Master_Active2[Subsidiary Employee ID]),
USERELATIONSHIP(Master_Active2[Period_Month], Master_In_Out[Period_Month]),
FILTER(
Master_In_Out,
Master_In_Out[Period_Year] = SELECTEDVALUE(Master_In_Out[Period_Year])
)
)
Proud to be a Super User! |
|
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 |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
9 | |
8 |