Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
clubspec
Helper III
Helper III

Add column based on a list from another table

Hi Experts,

I want to add a new column with look up value from another table with conditions.

i.e. New column in table 1 from Wkly Capacity column in table 2 but the conditons are:

WeekNum on table 1 = WeekNum on table 2 and WC (group) on table 1 = WC (Group) on table 2


Table 1Table 1Table 2Table 2

Both tables are currently linked separately to a calendar table on WeekNum, is this correct or I should create a relationship directly between Table 1 and Table 2?  If yes, link which column?

 

Thank you your help in advance,

Ray

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey,

 

just create a calculated column in table 1 like so:

name of the column = 
LOOKUPVALUE(
    '<table 2>'[Wkly Capacity]
    ,'<table 2>'[WeekNum] , '<table 1>'[WeekNum]
    ,'<table 2>'[WC (Group)] , '<table 1>'[WC (groups)]
)

Hopefully this is what you are looking for.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column in Table1

=CALCULATE(SUM('Table2'[Wkly capacity]),FILTER('Table2','Table2'[WeekNum]=EARLIER('Table1'[WeekNum])&&'Table1'[WC (Group)]=EARLIER('Table1'[WC (groups)])))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you Ashish,

I haven't tried yours but I took the simpler one which provided by Tom above.

Anyway, thank you also for the input.  I will try it myself later on another scenario.

Have a good day ahead.

Ray

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
TomMartens
Super User
Super User

Hey,

 

just create a calculated column in table 1 like so:

name of the column = 
LOOKUPVALUE(
    '<table 2>'[Wkly Capacity]
    ,'<table 2>'[WeekNum] , '<table 1>'[WeekNum]
    ,'<table 2>'[WC (Group)] , '<table 1>'[WC (groups)]
)

Hopefully this is what you are looking for.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Thank you Tom,

It works!

Have a good day ahead.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.