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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
NadaBen
Helper I
Helper I

Lookup value from one table from another

 

Hello,

i'm working on a project on Power BI but i'm still a beginner, so i need some help 🙂

i have table 1 :  "semaine"  and table 2 : "stock projeté"

 

Table 1 : Semaine

semaine.PNG

 

Table 2 : stock projeté

stock projeté.PNG

I have a relation 1 to many between Table 1 and 2. (key : ComonPeriod.Week)

--> i want to get the last day of week of my common period.Week of my table 1 from the column "last day of week" of table 2.

 

Thanks in advance 🙂

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Try as a column in your table 2 (you might need to check field/table spellings)

LastDayOfWeek = LookupValue('semaine'[Last Day of Week], 'semaine'[Common Period.Week], 'stock projeté'[Common Period.Week])

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Try as a column in your table 2 (you might need to check field/table spellings)

LastDayOfWeek = LookupValue('semaine'[Last Day of Week], 'semaine'[Common Period.Week], 'stock projeté'[Common Period.Week])

i tried the formula, but it didn't work, i have a blank in all my column

Anonymous
Not applicable

You are trying to create a calculated column that pulls down the value from the Semaine table?  In general, that is "not needed" -- you just use the value from Semaine.

 

But likely the calc column would be:

 

stock projeté[NewColumn] = RELATED(Semaine[Last Day Of Week])

 

i'm using a custom calendar, so when i import data from the BI, my week is like "Week 1,2017", and when i want to make date functions on my  week i can't do it because when i change the type to date with power bi it gives me a weird number", so i'm trying to get "the last day of week " from table "semaine", and then make date functions on this date.

 

By the way i tried your formula, it gives me always 07/05/2017!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.