Hi, I have been trying to build a small CRM a...

Hi, I have been trying to build a small CRM app for our sales team. This CRM app would pick data from other 2 apps called โ€˜Contactsโ€™ and โ€˜Deliveriesโ€™. (The contacts app will have details of the customers and Deliveries will have the list of deliveries made to this each customer). Now back to my issue, I this CRM database contains columns,

  1. Customer name

โ€“> references from contact table 2. Related Deliveries --> List view of โ€˜Deliveriesโ€™ table for the respective customer.

  1. Last delivery date --> Max delivery date of Related Deliveries.

  2. Time since last delivery --> No of days since last delivery was made.

I have been struggling on how to achieve the 3rd (Last delivery date) and 4th (Time since last delivery). I browsed the articles on MAX functions on a reference list, but couldnโ€™t get much. Can anyone help me on this?

Thanks

0 2 388
2 REPLIES 2

@Deepan_R,You may wish to

explore expressions something like below

For 3

MAX([Related Deliveries][Delivery Date])

Assuming delivery table has [Delivery Date] column

For 4 -

HOUR(TODAY() -

[Last Delivery Date]) /24

Assuming [Last Delivery Date] is the output of 3

@Suvrutt_Gurjar Thanks for the suggestionsโ€ฆNo-4 had worked out, but unfortunately, the no-3 didnโ€™tโ€ฆIt gave me an error invalid expression. However, i managed to fix this by creating a slice for the same table and used max function on the date field. It worked out. Thanks again!!

Top Labels in this Space