Forum Discussion
Pulling calculated measure from another Table
Hi All,
Does anyone know how I can pull a calculated measure from another table?
This is my Data Set
Table 1:
[The compliance status column in this table is a dax calculated measure]
Date Ref No Compliance Status
01/03/21 A1 Compliance
01/03/21 B1 Compliance
01/03/21 C1 Non - Compliance
01/04/21 A1 Non - Compliance
01/04/21 B1 Compliance
01/04/21 C1 Compliance
01/05/21 A1 Non - Compliance
01/05/21 B1 Non – Compliance
01/05/21 C1 Compliance
01/06/21 A1 Compliance
01/06/21 B1 Non – Compliance
01/06/21 C1 Non - Compliance
01/07/21 A1 Compliance
01/07/21 B1 Compliance
01/07/21 C1 Compliance
This is my Table two columns that match with Table one
Date Ref No
01/03/21 A1
01/03/21 B1
01/03/21 C1
01/04/21 A1
01/04/21 B1
01/04/21 C1
01/05/21 A1
01/05/21 B1
01/05/21 C1
01/06/21 A1
01/06/21 B1
01/06/21 C1
01/07/21 A1
01/07/21 B1
01/07/21 C1
Question: How can I pull the compliance status from Table 1 to Table 2 that matches the certain date and Ref no? As my Table 2 does not have columns that I can use to calculate the compliance status.
Hope it make sense and thanks for everyone help 🙂
Cheers,
Kev
- Anonymous5 years ago
Hi BigKev
So you want to add a DAX calculated column in Table 2?
Column = LOOKUPVALUE(Table1[Compliance Status],Table1[Date],Table2[Date],Table1[Ref No],Table2[Ref No]) or Column = CALCULATE(VALUES(Table1[Compliance Status]),FILTER(Table1,Table1[Date]=Table2[Date]&&Table1[Ref No]=Table2[Ref No]))
2 Replies
- AnonymousNot applicable
Hi BigKev
So you want to add a DAX calculated column in Table 2?
Column = LOOKUPVALUE(Table1[Compliance Status],Table1[Date],Table2[Date],Table1[Ref No],Table2[Ref No]) or Column = CALCULATE(VALUES(Table1[Compliance Status]),FILTER(Table1,Table1[Date]=Table2[Date]&&Table1[Ref No]=Table2[Ref No]))- BigKevHelper III
Thanks Anonymous . This is what I am looking for 🙂