Forum Discussion

Renee_Mas's avatar
Renee_Mas
New Member
3 years ago
Solved

Looking to match value from one colu

Hello PowerBI Experts,

 

I am a learner and have been stepping into new challenges each day.

I am hoping you will be able to steer me in the right direction.

I have candidates in each order and need to identify and list the Highest Application Status (last column in the data sample) they have attained in that order. 

I identified the highest stage a candidate attained (in Column E). Perhaps that step is not needed.

 

Now, I think I would need a fomula or some type of lookup function to identify the Application Status (C) that corresponds to the highest stage attained (Column D). Column E already has highest stage attained by that candidate so might be easier to use. 

Something like: identify highest stage for candiate A in order ID, pull application status name from Column C corresponding to highest stage into Highest Application Status (F). 

More context:

Not all candiates go to the same number of stages, some statuses could be skipped and candidates could go back but order of stages is always from 1 to 2 to 3, etc. per candiate. Some end at stage 2, some go to stage 10. 

I only need to identify the highest stage each candiate has attained in each order.

Order numbers are unique

Candidates could belong to more than one order but all I need is the highest stage they attained in each order.

 

Order IDCandidate name Application StatusStageHighest Stage for candidate Higest Application Status 
1AmbaNew16 
1AmbaOffer Accepted66Offer Accepted 
1AmbaOffer Cancelled36 
1AmbaOffer Pending Approval46 
1AmbaOffer presented26 
1AmbaOffer Sent56 
1HenrietteNew11New
1JaspreetDeclined33Declined 
1JaspreetNew13 
1JaspreetOffered23 
1KristaNew14 
1KristaOffer Pending Approval44Offer Pending Approval 
1KristaPre-Screen24 
1KristaPresented to HM 34 
1SorusNew11New
6ClaudiaDeclined22Declined 
6ClaudiaNew12 
6MadisonNew12 
6MadisonOffered22Offered
6NadiaDeclined33Declined 
6NadiaNew13 
6NadiaRejected by TAP23 
9RupinderNew11New
9SukhmanNew12 
9SukhmanPre-Screen22Pre-screen
9VictoriaDeclined23 
9VictoriaDeclined33Declined 
9VictoriaNew13 
12ADELDeclined33Declined 
12ADELIn-Progress23 
12ADELNew13 
12ALIREZADeclined33Declined 
12ALIREZAIn-Progress23 
12ALIREZANew13 
12ASSEMDeclined33Declined 
12ASSEMIn-Progress23 
12ASSEMNew13 
12DIANENew13 
12DIANEOffer presented to candidate23 
12DIANEOffered33Offered
12ImanDeclined33Declined 
12ImanIn-Progress23 
12ImanNew13 
12JilaDeclined35 
12JilaDeclined55Declined 
12JilaNew15 
12JilaOffered45 
12JilaRejected by TAP25 
12JupinderDiscussion on Hold 22Discussion on Hold 
12JupinderNew12 
12MeaghanDeclined44Declined 
12MeaghanIn-Progress24 
12MeaghanNew14 
12MeaghanOffer presented to candidate34 
12MichaelNew12 
12MichaelPre-Screen22Pre-screen
12MuhammadDeclined22Decined
12MuhammadNew12 
12MUHAMMADDeclined33Declined 
12MUHAMMADNew13 
12MUHAMMADRejected by TAP23 
12PeterDeclined33Declined 
12PeterNew13 
12PeterRejected by TAP23 
12PushpinderDeclined33Declined 
12PushpinderIn-Progress23 
12PushpinderNew13 
12TarekDeclined33Declined 
12TarekNew13 
12TarekRejected by TAP23 

Thank you,

 

 

Renee

  • NewStep=Table.Combine(Table.Group(PreviousStepName,"Order ID",{"n",let a=List.Max([Stage]) in Table.AddColumn(_,"Highest Application Status",each if [Stage]=a then [Application Status] else null)})[n])

3 Replies

  • wdx223_Daniel's avatar
    wdx223_Daniel
    Icon for Community Champion rankCommunity Champion

    NewStep=Table.Combine(Table.Group(PreviousStepName,"Order ID",{"n",let a=List.Max([Stage]) in Table.AddColumn(_,"Highest Application Status",each if [Stage]=a then [Application Status] else null)})[n])

    • Renee_Mas's avatar
      Renee_Mas
      New Member

      Thank you!

      I will give it a try later today and let you know if it worked:)

    • Renee_Mas's avatar
      Renee_Mas
      New Member

      Thank you! 

      Super greatful for this recommendation.

      I am sorry it took me so long to get it tested.

      Renee