Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have an app that wishes to present comparison data of two dates (present and a selected date in the past). The user can select the date which is then recorded as vInputDate. I now need to work out the logic to display the correct data line.
A simplified dataset would be:
Project Name | Data entry date | Data |
---|---|---|
Project A | 01/08/2017 | 1234 |
Project A | 01/09/2017 | 4123 |
Project A | 01/10/2017 | 3412 |
Project B | 01/08/2017 | ABCD |
Project B | 01/09/2017 | BCDA |
Project B | 01/10/2017 | CDAB |
So if the user selected 10/09/2017, the (fully working) app should display Project A: 4123 and Project B: BCDA, however with my current code (below) it also shows results for 01/08/2017.
=if([Data entry date]<=vInputDate,[Data])
Any advice on how I could execute this would be much appreciated.
Thanks
May be with Set analysis
Only({<[Data entry date] = {$(=Date(vInputDate, 'DD/MM/YYYY'))}>}Data)
what about
=if(fabs(vInputDate-[Data entry date])=fabs(min(vInputDate-[Data entry date])),[Data])