The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I have an excel file with the list of employees of a company by month and this list is updated every month. (See example below). I would like to create a visual on power bi that allows me to display only the new employees of the current month compared to the previous month.
For example 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.
Do you know please how can I do this?
Solved! Go to Solution.
Hi @Anonymous ,
Let's assume the Month field is Date type.
Please create a flag measure and then apply it to visual-filter pane:
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))
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
A mistake in your measure, please check:
Best Regards,
Eyelyn Qin
Hi @Anonymous ,
Let's assume the Month field is Date type.
Please create a flag measure and then apply it to visual-filter pane:
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))
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello Eyelyn9,
Thanks for helping me last time.
I would like to solicit you please for another question. Last time i was asking how to display new employees of the current month compared to the previous month. and we did :
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 : Carter and Alexander
Can you please help me again this time?
Best regards,
Rena.
Hello,
Thanks for your response.
I tried it and i have this error: The "CONTAINSROW" function does not support comparing Text type values with Date type values
@Anonymous , In case you added them as two tables create a common name table
Then create a common Name table and join it with both
name = distinct(union(distinct(Month1[Name]), distinct(Month2[Name]) ) )
In visual use this measure with name from common name table
measure = countrows(except(Month2[Name], Month1[Name] ))
I don't want to display the number of new employees but the list of new employees. Like that :
Hello,
Thank you for your answer.
I created a folder in which for each month I put the list of employees. I import this folder on powerbi by combining the data so that the list of employees is in a single and same table (see the example below).