Forum Discussion
RELATED() doesnt work corectly
- Anonymous3 years ago
Hi Anonymous ,
I created some data:
Table1:
Table2:
Here are the steps you can follow:
1. Create calculated column.
Use the Lookupvalue() function
Column = LOOKUPVALUE( 'Table2'[t2_c], 'Table2'[t2_a],'Table1'[t1_a],'Table2'[t2_b],'Table1'[t1_b])LOOKUPVALUE function (DAX) - DAX | Microsoft Learn
Or use the SumX(), Maxx() functions to get it
Column 2 = MAXX( FILTER( ALL(Table2), 'Table2'[t2_a]=EARLIER('Table1'[t1_a])&& 'Table2'[t2_b]=EARLIER('Table1'[t1_b])), 'Table2'[t2_c])SUMX function (DAX) - DAX | Microsoft Learn
MAXX function (DAX) - DAX | Microsoft Learn
2. Result:
Refer to:
Power BI: RELATED function doesn't show related columns - deBUG.to
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Anonymous ,
I created some data:
Table1:
Table2:
Here are the steps you can follow:
1. Create calculated column.
Use the Lookupvalue() function
Column =
LOOKUPVALUE(
'Table2'[t2_c],
'Table2'[t2_a],'Table1'[t1_a],'Table2'[t2_b],'Table1'[t1_b])
LOOKUPVALUE function (DAX) - DAX | Microsoft Learn
Or use the SumX(), Maxx() functions to get it
Column 2 =
MAXX(
FILTER(
ALL(Table2),
'Table2'[t2_a]=EARLIER('Table1'[t1_a])&&
'Table2'[t2_b]=EARLIER('Table1'[t1_b])),
'Table2'[t2_c])
SUMX function (DAX) - DAX | Microsoft Learn
MAXX function (DAX) - DAX | Microsoft Learn
2. Result:
Refer to:
Power BI: RELATED function doesn't show related columns - deBUG.to
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly