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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All - I would greatly appreciate thoughts on the below issue that has stumped me.
I am attempting to create a simple table viz in PBI Desktop that includes a calculated column from one table based on a LOOKUPVALUE formula referencing columns in a separate table. The logic is to look for a certain value from Table 1 in one column of Table 2, and, if found, transform it to the corresponding value in a different column of Table 2. If the value is not found in Table 2, the calculated column is populated by the original value from Table 1.
Calculated Column Formula:
Solved! Go to Solution.
Hi @Matthew1900 ,
I created some data:
Table1:
Table2:
Here are the steps you can follow:
1. Create calculated column.
Calculated Column Formula =
var _Table1=
SELECTCOLUMNS('Table2',"1",[Group])
return
IF(
'Table1'[Group] in _Table1,
CALCULATE(
SUM('Table2'[Amount2]),FILTER(ALL(Table2),'Table2'[Group]='Table1'[Group]))
,'Table1'[Amount])
2. Result:
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 @Matthew1900 ,
I created some data:
Table1:
Table2:
Here are the steps you can follow:
1. Create calculated column.
Calculated Column Formula =
var _Table1=
SELECTCOLUMNS('Table2',"1",[Group])
return
IF(
'Table1'[Group] in _Table1,
CALCULATE(
SUM('Table2'[Amount2]),FILTER(ALL(Table2),'Table2'[Group]='Table1'[Group]))
,'Table1'[Amount])
2. Result:
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,
Share some data, describe the question and show the expected result.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!