Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
Each of the customers have 2 dates, Edate and Odate. I now want to find and use the smallest date as a new value in my dashboard.
Example
Customer | Edate | Odate | Newdate |
Adam | 23 Oct 2022 | 18 May 2022 | 18 May 2022 |
Alvin | 18 May 2021 | 8 Aug 2022 | 18 May 2021 |
Casper | 13 Dec 2019 | 1 Oct 2022 | 13 Dec 2019 |
What is the most effective way of doing this?
Use the RangeMin() function , example
RangeMin(Edate,Odate) as NewDate
In the script as below
If(Edate<Odate,Edate,If(Odate<Edate,Edate)) as Newdate
Thank you! That seems to work for when all the date values are there. However there are some dates that are empty. Any tips on how to make a rule that fixes the issue with non existing dates?
What do you want to do when dates are null, share some data on such instances and what you expect as output.
If dates are missing, I still want the first/earliest date in my new date field. Something like this:
Customer | Edate | Odate | Newdate |
Adam | 23 Oct 2022 | 18 May 2022 | 18 May 2022 |
Alvin | 18 May 2021 | 8 Aug 2022 | 18 May 2021 |
Casper | 13 Dec 2019 | 1 Oct 2022 | 13 Dec 2019 |
Maya | 5 Aug 2022 | 5 Aug 2022 | |
Peter | 1 Dec 2021 | 1 Dec 2021 |
Use the RangeMin() function , example
RangeMin(Edate,Odate) as NewDate