I’m trying to create a control that changes a value if a name & date match, but I can’t come up with the correct formula.
I have 2 tables, Table A and Table B. Both tables have names and dates in them. If a name & date from Table B matches with name & date from Table A, then I want to change a value in Table A to the value from Table B.
An added difficulty is that I’m comparing a single date (from Table A) to a date range (from Table B).
Please see the sample doc below:
I hope someone can point me in the right direction?
It makes total sense now that you showed me, but I could not come up with it myself.
I notice you use [Start Date] <= CurrentValue and [End Date] >= CurrentValue . If I understand correctly this checks if the date is between [Start Date] and [End Date]? In other words, I don’t need the date list column? I didn’t know that trick, learned another new thing today. This might come in handy more often
I never even noticed the date list column, and now, looking at it, I have to say it is not very practical when dealing with longer periods. When I build a formula I always try to keep in mind that things might change in the future. So, whenever possible, I don’t use extra columns with results that I can generate in my formula.
The short answer: no, you don’t need the Date List column.
Hey Joost, I agree, one should avoid extra columns where possible. Now that you’ve learned me this trick I can remove the Date List column. Thanks again!
I’ve been trying to implement the formula to my actual doc, but it’s not working unfortunately.
The bottom of the formula window does show the “action” icons, so that made me think it would work. However when I press the button it says “no action taken”.
Maybe it has to do with current value? Its bubbles are white, and not green. Maybe that’s not working because I’ve added a filter before the FormulaMap?
Hey Bas,
You have to copy your doc, clean the tables and enter some dummy information and share it with us in order to help you any further. From a screenprint I can’t troubleshoot (well, I probably could, but I don’t have enough time to reverse engineer your doc).
Or send me a PM to some other options.
Greetings,
Joost