Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi everyone.
Please I need some help.
Currently I have a dataset which contains the Headcount of the company by month.
I need to display the total of people that joined and left the company monthly and the total of headcount by month as well.
The problem is there are some people that joined the company as a contractor and then became permanent.
So here I have an example:
First as a contractor then as a permanent.
Row Data
In order to display the count of people that joined and left the company monthly I need to figure out how to ignore the last date (04/06/2022) and consider the first date (04/06/2021)
Another thing, I also need to take into account that in this particular case they didn’t leave the company so I also can’t count this in leavers.
On the other hand, the are some people that have actually left so I will need to consider the newer date and discard the oldest.
And finally, I don’t know how to sum the total of the previous month with the current month to have the total of headcount.
Solved! Go to Solution.
Ok please try
Summary = SUMMARIZE(TotalActivosSaidas,TotalActivosSaidas[ID_EMPREGAD], "First Start Date", CALCULATE(FIRSTDATE(TotalActivosSaidas[DAT_INI_ACT_EMP]),TotalActivosSaidas[DAT_INI_ACT_EMP] = MAX(TotalActivosSaidas[DAT_INI_ACT_EMP]), "Last day", CALCULATE(LASTDATE(TotalActivosSaidas[DAT_SAID]),TotalActivosSaidas[DAT_SAID] =max(TotalActivosSaidas[DAT_SAID]))))
Hi @Diana_Jardim100 ,
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hello @Diana_Jardim100 i think a summarized table could help
summary of table = summarize(table,[ID_EMPREGAD], "First Start Date",calculate(firstdate(dat_ini_act_emp)FILTER(table,dat_ini_act_emp = max(dat_ini_act_emp)),"Last day",calculate(lastdate(dat_said_one_hr),FILTER(table,dat_said_one_hr = max(dat_said_one_hr))
First Many thanks.
I'm almost there 🙂
I don't know what I'm doing wrong but it has return this message.
The True/False expression does not specify a column. Each True/False expressions used as a table filter expression must refer to exactly one column.
Ok please try
Summary = SUMMARIZE(TotalActivosSaidas,TotalActivosSaidas[ID_EMPREGAD], "First Start Date", CALCULATE(FIRSTDATE(TotalActivosSaidas[DAT_INI_ACT_EMP]),TotalActivosSaidas[DAT_INI_ACT_EMP] = MAX(TotalActivosSaidas[DAT_INI_ACT_EMP]), "Last day", CALCULATE(LASTDATE(TotalActivosSaidas[DAT_SAID]),TotalActivosSaidas[DAT_SAID] =max(TotalActivosSaidas[DAT_SAID]))))
same error
Do you mind sharing some sample data to help you?
is this the result you desire?
Summary = SUMMARIZE(ALL(Diana),Diana[ID_EMPLOYEE],"Start Date",CALCULATE(MIN(Diana[INITIAL_DATE])),"End Date",CALCULATE(MAX(Diana[END_DATE])))
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
10 | |
10 | |
9 | |
7 |