Finding a max value of a reference list and returning a different value from the row

I want to create a function for lead follow up. So, thereโ€™s a Table, โ€œTeam and Agentsโ€ with a row called, โ€œFollow-Up Date.โ€ There is another table called โ€œFollowupโ€, which references to โ€œTeam and Agents.โ€ Each time the Owner contacts a lead I want to add a row to โ€œFollowup.โ€ With the addition of a new row, a follow-up date is required, called โ€œNext Follow-Upโ€. The owner can pick 30, 60, or 90 representing the number of days from now to follow up on. In the row, Team and Agents(Follow-Up Date), we want to display the latest submission date + the latest submission dateโ€™s โ€œNext Follow-Up.โ€

Iโ€™m having trouble figuring this one out. This is all I have so far and I couldnโ€™t get it to work right. Please help.

(LOOKUP(MAXROW(โ€œFollowupโ€, โ€œDateโ€, ([Agent] = [_THISROW].[Name])),โ€œFollowupโ€,"_RowNumber",โ€œDateโ€))
+
LOOKUP(MAXROW(โ€œFollowupโ€, โ€œDateโ€, ([Agent] = [_THISROW].[Name])),โ€œFollowupโ€,"_RowNumber",โ€œNext Follow-upโ€)

0 9 784
9 REPLIES 9

Are you trying to do some sort of Date/Time math here?

Or are you just trying to concatenate 2 date values into 1 text field?

If the former, I think youโ€™ll have to describe your situation in more detail.
Are you having trouble adding the 30/60/90 days to your date?

If the latter, try just changing the โ€˜+โ€™ in your expression to a โ€˜&โ€™. Assuming both of those LOOKUP() expressions are returning the correct value separately.

Yes, I am trying to add days to a date. The problem is trying to pull the two variables in order to do the addition. The lookup functions are not working correctly.

Best,

Do the 2 LOOKUP() expression work correctly by themselves?

Is there any error shown?

Maybe try wrapping the first one inside of DATE(), and the second inside of NUMBER() to force the correct data types.

Steve
Platinum 4
Platinum 4

Yep.

I would actually recommend instead that you add a normal (non-virtual) column to the Followup table with an App formula expression of:

([Date] + [Next Follow-up])

Then you can just query that column directly to get the date.

The expression youโ€™re trying to use is very, very inefficient. You absolutely do not want it in a virtual column if you care about performance.

Iโ€™m struggling.

(LOOKUP(MAXROW(โ€œFollowupโ€, โ€œDateโ€, ([Agent] = [_THISROW].[Contact Number])),โ€œFollowupโ€,"_RowNumber",โ€œNext Follow-Up Dateโ€))

This does not return anything.

Have you tried the Test button in Expression Assistant?

The test link gets stuck in loading.

Screenshot, please.

I was using Safari. Chrome displayed it, and I got everything working. Thanks again. You rock!

Top Labels in this Space