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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
carpe79
Frequent Visitor

Lookupvalue From Column name

Hi There ;

 

I need your support to create a column , let me explain what i need ;

 

I have two table , "Table A " and "Table B" named , 

 

Table A is as below ,  it has date column and number column , under number column there are numbers as you see

 

 cap1.JPG

 

And Table B is as below , it has date column too , but there are columns after that which are named with numbers , and under this number named columns there are values.

 

cap2.JPG

 I need that , system will make lookupvalue and will take value from Table B to Table A like that  ; system will check on Table A date column , and will check on Table B date colum too if there is same date , then system will check on Table A number named column , and then will take this number and will check Table B column names , which one is this number , and after that will put under this number value to Table A 

 

an example will be more easy to understand maybe 🙂 ..... on Table A first line , date is   "1.11.2013" and near it under "number " column value is " 3" , now we will check on Table B date coulmn, when , we can see in this dataset first line date is "1.11.2023" too , then for second reference  our value from Table A was "3" , now for the same line we will check column names and find "3" , Where column "3"  meets the date column value is "125" , so this value will come to Table A as a new column as below excample like a calculated column.

 

cap3.JPG

 

 

Thanks for your kind supports 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@carpe79 

you can select the date column in table B and unpivot other columns

11.PNG

12.PNG

 

then you can merge table in PQ

 

press ctrl when select columns, you can see numbers besides the column name. That means the date and number column both need to be matched.

 

13.PNG

 

then you expand the column

 

14.PNG

 

or you can use DAX to create a column

 

Column = LOOKUPVALUE('Table B'[Value],'Table B'[Attribute],'Table A'[Number],'Table B'[Date],'Table A'[Date])
11.PNG
 
pls see the attachment below

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
ryan_mayu
Super User
Super User

@carpe79 

you can select the date column in table B and unpivot other columns

11.PNG

12.PNG

 

then you can merge table in PQ

 

press ctrl when select columns, you can see numbers besides the column name. That means the date and number column both need to be matched.

 

13.PNG

 

then you expand the column

 

14.PNG

 

or you can use DAX to create a column

 

Column = LOOKUPVALUE('Table B'[Value],'Table B'[Attribute],'Table A'[Number],'Table B'[Date],'Table A'[Date])
11.PNG
 
pls see the attachment below

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors
Top Kudoed Authors