New Enterprise DNA Initiatives

How to Lookup a value from a field in same table, based on it having an early start date

Context: Sales Reps are picking the wrong product when creating renewal Opportunities.

End Goal: Find renewal Opps where ‘Product ID’ and ‘Previous Product ID’ don’t match. Column ‘Renewing correct Product’ (G1 = C1).

Problem: I can’t figure out how to pull in the previous opportunity product. I created an ‘Account ID & Product ID concat’ column and tried to do a lookup off that field on a dynamic table sorted ‘Start Date’ (Newest - Oldest) and ‘Start Date’ < ‘Start Date’.

in my data column ‘Previous product’ is what I’m trying to populate

Addition insight:
Yes multiple renewals is possible (Renewing a renewal)
I don’t care that previous product for ‘type = New Business’ will always be blank because I’ll filter those out

Hi @Mwoody_05, we aim to consistently improve the topics being posted on the forum to help you in getting a strong solution faster. While waiting for a response, here are some tips so you can get the most out of the forum and other Enterprise DNA resources.

  • Use the forum search to discover if your query has been asked before by another member.
  • When posting a topic with formula make sure that it is correctly formatted to preformatted text </>.
    image
  • Use the proper category that best describes your topic
  • Provide as much context to a question as possible.
  • Include the masked demo pbix file, images of the entire scenario you are dealing with, screenshot of the data model, details of how you want to visualize a result, and any other supporting links and details.

I also suggest that you check the forum guideline How To Use The Enterprise DNA Support Forum. Not adhering to it may sometimes cause delay in getting an answer.

Please also check the How To Mask Sensitive Data thread for some tips on how to mask your pbix file.

@Mwoody_05,

Give this a go:

Previous Product = 

VAR SelDate = SELECTEDVALUE(Data[Start Date] )

VAR PrevDate =
CALCULATE(
    MAX(Data[Start Date] ),
    Data[Start Date] < SelDate,
    ALLEXCEPT( Data, Data[Opp ID] )
)

VAR PrevProduct =
CALCULATE(
    MAX( Data[Product ID] ),
    Data[Start Date] = PrevDate,
    ALLEXCEPT( Data, Data[Opp ID] )
)

RETURN
PrevProduct

image

I hope this is helpful. Full solution file attached.

– Brian
eDNA Forum - Previous Product Solution.pbix (122.7 KB)

1 Like

Hi @Mwoody_05, did the response provided by @BrianJ help you solve your query? If not, how far did you get and what kind of help you need further? If yes, kindly mark the thread as solved. Thanks!

Hi @Mwoody_05, we’ve noticed that no response has been received from you since the 24th of December. We just want to check if you still need further help with this post? In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the checkbox. Thanks!

Hi @Mwoody_05,

A response to this post has been tagged as “Solution”. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the check box.

Thanks!"