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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
SMatos94
New Member

Table with duplicate rows by name but different status.

Hello,

 

Table with duplicate rows by name but different status.

I have a table with duplicate rows by user name, but with different status. I need to clear the table, so that in case of duplicate rows, only the activation persists.

Does anybody know how to solve this?

 

In this example, you would need to analyze lines one and two, keeping only the one with active status.
The same for lines 4 and 5.

NameStatusSituationID
Ana SilvaActiveNormal activity1234
Ana Silva31/05/2024Transfer1234
Joao SouzaActiveNormal activity2345
Maria PaulaActiveNormal activity3456
Maria Paula07/04/2024Transfer3456
Mario Oliveira28/02/2023Company termination6789
Edson Vieira09/07/2022Company termination7894

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @SMatos94 

I made some modifications. I create a new table and use the following DAX:

FilteredTable = FILTER(
    ALL('Table'),
    [Situation] = "Normal activity" || [Situation] = "Company termination"
)

 

Here is the preview:

 vyohuamsft_0-1721352909174.png

 

How to Get Your Question Answered Quickly

Best Regards

Yongkang Hua

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

5 REPLIES 5
Anonymous
Not applicable

Hi, @SMatos94 

Create a new table that contains only the rows in which Activity is created. This will effectively remove duplicate rows that do not have a status of Active. Use the following DAX:

NewTable = 
CALCULATETABLE(
    'YourTable',
    'YourTable'[Status] = "Active"
)

 

Here is my preview:

vyohuamsft_0-1721281923908.png

 

How to Get Your Question Answered Quickly

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The problem is that I need to know if the employee was terminated. So I can't remove the rows with status other than "Active".

Anonymous
Not applicable

Hi, @SMatos94 

I made some modifications. I create a new table and use the following DAX:

FilteredTable = FILTER(
    ALL('Table'),
    [Situation] = "Normal activity" || [Situation] = "Company termination"
)

 

Here is the preview:

 vyohuamsft_0-1721352909174.png

 

How to Get Your Question Answered Quickly

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

GilbertQ
Super User
Super User

Hi @SMatos94 

 

Equal to the status column to where it equals active.?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Yes!

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.