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.
Hello,
Last time i was asking how to display new employees of the current month compared to the previous month in a datasheet
in January we had John, Carter, Kim and Alexander.
In February we have John, Carter, Kim, Alexander and Sienna.
The visual should then show me only Sienna
This is the solution that worked for me :
Flag = var _preMonth=DATEADD('Table'[Month],-1,MONTH) var _preEmps= SUMMARIZE(FILTER(ALL('Table'),YEAR([Month])= YEAR(_preMonth) && MONTH([Month])=MONTH(_preMonth)) ,[Name of Employees]) return IF(_preMonth<>BLANK(),IF( MAX('Table'[Name of Employees]) in _preEmps,0,1))
Now i would like to have the list of all the employees who have disappeared (they are no longer in the database)
Example :
The visual should then show me only : Carter and Alexander
Can you please help ?
Best regards,
Rena.
Solved! Go to Solution.
Hi @Anonymous ,
You can just change your expression like so:
Flag 2 =
VAR _curMonth =
DATEADD ( 'Table2'[Month], 1, MONTH )
VAR _curEmps =
SUMMARIZE (
FILTER (
ALL ( 'Table2' ),
YEAR ( [Month] ) = YEAR ( _curMonth )
&& MONTH ( [Month] ) = MONTH ( _curMonth )
),
[Name of Employees]
)
RETURN
IF (
_curMonth <> BLANK (),
IF ( MAX ( 'Table2'[Name of Employees] ) IN _curEmps, 0, 1 )
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You can just change your expression like so:
Flag 2 =
VAR _curMonth =
DATEADD ( 'Table2'[Month], 1, MONTH )
VAR _curEmps =
SUMMARIZE (
FILTER (
ALL ( 'Table2' ),
YEAR ( [Month] ) = YEAR ( _curMonth )
&& MONTH ( [Month] ) = MONTH ( _curMonth )
),
[Name of Employees]
)
RETURN
IF (
_curMonth <> BLANK (),
IF ( MAX ( 'Table2'[Name of Employees] ) IN _curEmps, 0, 1 )
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you Icey.
It works for me.
Best regards,
Yanne.
@Anonymous , Create a date using month year. Using common date and employee table follow this customer retention logic
Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/ba-p/1361529
Hi @Anonymous
I hope "Month" is a date column. Then you can drag this measure into the filter pane and select "Not is blank"
Flag =
VAR NumberOfMonths = 1
VFlag =
VAR NumberOfMonths = 1
VAR CrrentPeriod =
MAX ( 'Table'[Month] )
VAR PreviousPeriod =
DATEADD ( CrrentPeriod, - NumberOfMonths, MONTH )
VAR LastPeriodEmployees =
CALCULATETABLE (
VALUES ( 'Table'[Name of Employees] ),
'Table'[Month] = PreviousPeriod
)
VAR CurrentPeriodEmployees =
CALCULATETABLE (
VALUES ( 'Table'[Name of Employees] ),
'Table'[Month] = CrrentPeriod
)
RETURN
COUNTROWS ( EXCEPT ( LastPeriodEmployees, CurrentPeriodEmployees ) )
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 |
---|---|
11 | |
10 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
13 | |
12 | |
11 | |
8 |