Forum Discussion
Fidzi8
1 year agoHelper V
Inserting the correct value
Hi comunnity, I need help with this problem. I have two simple tables. The first table contains a list of transports from where - to where (columns "C" - "D") on a given day (column „B“). ...
- 1 year ago
You can create a calculated column in the first table like
Distance = SELECTCOLUMNS ( FILTER ( Table2, Table2[ID] = Table1[ID] && Table2[From] = Table1[From] && Table2[To] = Table2[To] && Table2[Valid From] <= Table1[Date] && ( ISBLANK ( Table2[Valid To] ) || Table2[Valid To] >= Table1[Date] ) ), "@value", Table2[Distance] ) - 1 year ago
Try
Distance = SELECTCOLUMNS ( TOPN ( 1, FILTER ( Table2, Table2[ID] = Table1[ID] && Table2[From] = Table1[From] && Table2[To] = Table2[To] && ( ( Table2[Valid From] <= Table1[Date] && Table2[Valid To] >= Table1[Date] ) || ( ISBLANK ( Table2[Valid To] ) && ISBLANK ( Table2[Valid From] ) ) ) ), Table2[Value To], DESC ), "@value", Table2[Distance] )
v-karpurapud
1 year agoCommunity Support
Hi Fidzi8
Could you please confirm if your query have been resolved the solution provided by johnt75 ? If they have, kindly mark the helpful response and accept it as the solution. This will assist other community members in resolving similar issues more efficiently.
Thank you