Forum Discussion
Compare two dates from different tables, using if condition
You may be able to use the LOOKUPVALUE function in this case.
As an example I have two tables
Table 1
| Date | Account |
| 3/3/2024 | ABC |
| 3/3/2024 | DEF |
| 3/4/2024 | ABC |
| 3/5/2024 | GHI |
| 3/5/2024 | DEF |
and Table 2
| Date | Account |
| 3/3/2024 | ABC |
| 3/4/2024 | DEF |
| 3/5/2024 | GHI |
and I want to know if the values in Table 1 appear in Table 2.
I can add a calculated column to Table 1 with the following code...
isOnTable2 =
var _lookup =
LOOKUPVALUE('Table 2'[Account], 'Table 2'[Account], [Account], 'Table 2'[Date], [Date])
Return
IF(
_lookup = [Account],
"Yes",
"No"
)
and end up with the result...
Hope this gets you pointed in the right direction.
Hi, is not working, see the following example I am getting
- jgeddes2 years agoSuper User
If you can provide a sample of your data (nothing sensitive) I will likely be able to provide a better solution for you.
- Anonymous2 years agoNot applicable
I can't share the data
Table 1:
Account & Date
Table 2:
Account & Date
Relationship: Account & Account
The column that I am creating is in the Table 1, and there are more columns. I created a table with more columns ej. Name, Second Name, Account, Date table 1, date table 2- Ashish_Mathur2 years agoSuper User
Hi,
Share some dummy data and show the expected result.