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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Remove Rows based on date

I can't find anything exactly like what I'm trying to accomplish, so I need a bit of help.

 

I have a data set where I have some problem children that i need to remove from the data set entirely.

 

I need to keep the most recent date for each status and ID.

 

here's what they look like:

 

 

ID1

Status1Date1
ID1Status1Date2
ID1Status1Date3
ID1Status2Date4
ID1Status2Date5
ID1Status2Date6
ID2Status1Date7
ID2Status1Date8
ID2Status1Date9
ID2Status2Date10
ID2Status2Date11

 

Desired State:

 

ID1Status1Date3
ID1Status2Date6
ID2Status1Date9
ID2Status2Date11

 

Thanks!

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hi @Anonymous 

create new calculated table

Table 2 = 
FILTER(
ADDCOLUMNS('Table', "Rank", RANKX(FILTER('Table', 'Table'[Status]=EARLIER('Table'[Status]) && 'Table'[ID]=EARLIER('Table'[ID])),'Table'[Date],,DESC)),
[Rank]=1
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

3 REPLIES 3
az38
Community Champion
Community Champion

Hi @Anonymous 

create new calculated table

Table 2 = 
FILTER(
ADDCOLUMNS('Table', "Rank", RANKX(FILTER('Table', 'Table'[Status]=EARLIER('Table'[Status]) && 'Table'[ID]=EARLIER('Table'[ID])),'Table'[Date],,DESC)),
[Rank]=1
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Nailed it.  You're my new hero.

 

😁

Anonymous
Not applicable

Also,

 

anyone with the same problem...

 

You'll need to recreate in the created table any calculated columns (and I'm assuming measures) that you had already created in the original table.  otherwise you may have bad data if you were pulling from one of the rows that got removed.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.