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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Hollys83
Frequent Visitor

Pull two most recent dates

I need to pull the two most recent dates or if not two the most recent. Green is what I need to keep. 

 

Hollys83_0-1700270709254.png

 

 

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

If you want a Power Query solution, then share data in a format that can be pasted in an MS Excel file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@Hollys83 , Create Rank using rank

 

Rank 1= Rank(Dense, allselected(Table[HHID], Table[Date]) , Orderby (Table[Date], desc),,PARTITIONBY(Table[HHID])  )

 

Use a visual-level filter for [Rank 1] <=2

 

Power BI - New DAX Function: RANK - How It Differs from RANKX: https://youtu.be/TjGkF44VtDo

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.