Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi,
I need to get the OutputID based on an Indicator in another table from the same group.
Can this be done through a DAX formula ?
Table 1 : OutputID is field I need to fetch from Table 2.
Table 2 has the grouping in the PrimaryKey and in that group, Valid column if it is X then that entry should be copied to AlternateID.
ID_2 is the link between the two tables.
Thanks a lot in advance.
Hi @plugwater
For your question, here is the method I provided:
Make sure you have the correct relational connections between your tables.
Create a column.
OutputID =
VAR _Valid = CALCULATE(
MAX('Table2'[ID_2]),
FILTER(
ALL('Table2'),
'Table2'[ID_2] = EARLIER('Table1'[ID_2]) &&
'Table2'[Valid] = "X"))
RETURN
_Valid
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for this.
This does not work. I applied the formula and I would like the OutputID in all the rows.
I am not sure if the MAX condition works here.