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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mkrapez
Frequent Visitor

Advanced Filter need HELP Multiple Variable

Hi, 

 Capture.PNGI am trying to filter to only the most recent date, this is a small example of over 500k rows.


1. You can see that there are two sets of reading point for this shed, I am trying to filter to only the most recent arrival_datetime. There are also internal points so not just ne,nw,se,sw,cent. This structure is just small so only corners were done.

I had something like filter(max(arrival_datetime)), this is not correct.

 

Maybe a formula that has site number and room_name equal while taking the max of the arrival date to get the proper reading point. 

 

Thank you,

 

 

1 ACCEPTED SOLUTION
alexei7
Continued Contributor
Continued Contributor

Hi mkrapez,

 

I think you can do this by creating a new table to summarize your existing values.

 

Try the following (obviously replacing "Table1" and column names with your real names):

 

Table = FILTER(Table1,Table1[arrive_datetime]=CALCULATE(max(Table1[arrive_datetime]),ALLEXCEPT(Table1,Table1[site_number])))

Hope that helps,

Alex

View solution in original post

5 REPLIES 5
alexei7
Continued Contributor
Continued Contributor

Hi @mkrapez,

 

Sorry, I'm not sure what you're trying to do.

 

Is it a table with all values for a site_number with the most recent arrival_datetime?

 

What is the end result you would like to see?

 

Alex

Hi @alexei7,

 

I am trying to filter out the older values(get rid of them/delete them) and only keep the most recent values.

Some rooms may just have only one survey, so its fine but some have two surveys so we need to take only the most up to date values. 

I put this data on a scatter plot with an X & Y Path and some of the rooms have points over top each other since the room was re-surveyed. 

 

Thank you,

 

 

 

@alexei7

 

This is what the output looks like so all the variables on the left side have to be equal before we take the max of the arrival_dateTime. 

 

So we have points on top each other in the scaterplott since there are two sets if a survey was done twice. And we want to take the most recent arrival_Datetime. I get errors where the older values appear when hovering over the points.

 

Does this help you understand more?

Capture1.PNG 

@alexei7 this is for the post above

alexei7
Continued Contributor
Continued Contributor

Hi mkrapez,

 

I think you can do this by creating a new table to summarize your existing values.

 

Try the following (obviously replacing "Table1" and column names with your real names):

 

Table = FILTER(Table1,Table1[arrive_datetime]=CALCULATE(max(Table1[arrive_datetime]),ALLEXCEPT(Table1,Table1[site_number])))

Hope that helps,

Alex

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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