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
Fro88er
Helper IV
Helper IV

Prior Date at each ID, Per Sequence

I am trying to figureout the days to redeploy a candidate. First I need the [dateBegin] from next placement to be on the same row as the prior placement.  (I will take a meaure or calc column solution). Below is what I have so far, but I can't get the next logic, Earlier? or other function to grab the right date.

 

This is a sample of one (269468) of many candidates in the table. 

Candidates: have unique IDs

PlacementID: are sequential in time, (I don't know how to use this to my benifit)

 

Thank you so much for assisting!

 

My attempt: 

earlier.Allexcept2.JPG

(My Attempt) Redeploy Date =
CALCULATE(
MIN(FactPlacements[dateBegin]),
ALLEXCEPT(FactPlacements, FactPlacements[candidateID])
)

 

 

Desired Result in Yellow:

earlier.Allexcept.JPG

 

Sameple Data:

placementIDcandidateIDdateBeginActualEndDateRedeployDate (desired Result)
28595269468
 

 

3/28/2016
8/12/201610/3/2016
3071726946810/3/201611/13/201611/14/2016
3114426946811/14/2016  
1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

This calculated column formula works

=CALCULATE(MIN(Data[dateBegin]),FILTER(Data,Data[candidateID]=EARLIER(Data[candidateID])&&Data[dateBegin]>EARLIER(Data[dateBegin])))

Hope this helps.

Untitled.png


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

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

This calculated column formula works

=CALCULATE(MIN(Data[dateBegin]),FILTER(Data,Data[candidateID]=EARLIER(Data[candidateID])&&Data[dateBegin]>EARLIER(Data[dateBegin])))

Hope this helps.

Untitled.png


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

Thank you so much!  You made my weekend. 

 

Kind regards,

Mark

You are welcome.


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

@Fro88er , Try a new column like

new column = minx(filter(Table, [candidateID] =earlier([candidateID]), [dateBegin] > earlier([dateBegin])),[dateBegin])

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

I am getting this error.

 

earlier.Allexcept3.JPG

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.