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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Jorgast
Resolver II
Resolver II

Find previous date based on single date per record.

Hello Power BI Community

 

I need your help.  What I want to do is compare the current row data and find the previous date a case was submitted for the same account number. If the data is the 1st case created then just have that created date be the previous date.

 

While searching the Community forum, I have come across different methods using Indexes, Min, and even Minx. I have tried those options and have not gotten the desired outcome. The closest calculation I have found is. What am I missing?

 

CALCULATE(MIN(Case[Created_Date]),Filter(Case, Case[ID] = EARLIER(Case[ID])))

 

Month            Acct Num            Case_Num   Created_Date                  ID                                Previous Case (Desired Outcome)

Sep-201500233081104676419/2/2020 12:3715002330800001009/2/2020 12:37
Sep-201500233081106424579/4/2020 14:5415002330800001009/2/2020 12:37
Sep-202903335101110220709/11/2020 17:2429033351000001009/11/2020 17:24
Sep-201500118711110826219/14/2020 13:1815001187100001009/14/2020 13:18
Sep-202903335101112991579/16/2020 18:1729033351000001009/11/2020 17:24
Sep-201500118711113466749/17/2020 13:1315001187100001009/14/2020 13:18
Sep-202903335101115229739/21/2020 16:2329033351000001009/16/2020 18:17
Sep-201500118711117513379/23/2020 20:5915001187100001009/17/2020 13:13
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Jorgast , Previous date as a new column

MAXX(Filter(Case, Case[ID] = EARLIER(Case[ID]) && Case[Created_Date] <earlier(Case[Created_Date])),Case[Created_Date])

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

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Jorgast , Previous date as a new column

MAXX(Filter(Case, Case[ID] = EARLIER(Case[ID]) && Case[Created_Date] <earlier(Case[Created_Date])),Case[Created_Date])

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors