Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Compare two excel files in power bi to get an specific information

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?

 

Rena_0-1645139711137.png

Rena_2-1645139742858.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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))

Eyelyn9_1-1645513065712.png

 

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.

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Hi @Anonymous ,

 

A mistake in your measure, please check:

Eyelyn9_0-1645578201351.png

 

Best Regards,
Eyelyn Qin

Anonymous
Not applicable

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))

Eyelyn9_1-1645513065712.png

 

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.

Anonymous
Not applicable

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 : 

Rena_1-1649761846676.png

 

The visual should then show me : Carter and Alexander

Can you please help me again this time?

Best regards,

 

Rena.

 

Anonymous
Not applicable

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

 

Rena_0-1645532461348.png

 

amitchandak
Super User
Super User

@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] ))

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

I don't want to display the number of new employees but the list of new employees. Like that :

Rena_1-1645173012306.png

 

Anonymous
Not applicable

 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).

 

Rena_0-1645172650337.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors