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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
arvindarvind24
Helper II
Helper II

Need to create Date column with relationship table

HI All,

 

  Need your help on creating the date column with relationship table.

2022-12-21 19 13 24.png

OutPut:

 

CodeSale DateicodeGrc Date
107-01-2022AK00101-01-2022
111-01-2022AK00205-01-2022
111-01-2022AK00305-01-2022
219-01-2022AK00413-01-2022
219-01-2022AK00513-01-2022
221-01-2022AK00115-01-2022
324-01-2022AK00218-01-2022
524-01-2022AK00318-01-2022
703-02-2022AK00428-01-2022
203-02-2022AK00428-01-2022
626-01-2022AK00120-01-2022
321-01-2022AK00215-01-2022
824-01-2022AK00318-01-2022
824-01-2022AK00418-01-2022
303-02-2022AK00428-01-2022

 

Link: https://drive.google.com/file/d/195zv-UmlYc3sU30cJ7NOf_apuyEMc0m6/view?usp=sharing

@amitchauhan @bvanderwatt @ray_ux @tamerj1 @SpartaBI @v-chenyue-msft  @mangaus1111

@v-jianhe-msft 

1 ACCEPTED SOLUTION

GRC Date = CALCULATE(
   MIN(GRC[date]),
   FILTER(GRC,GRC[code]=Sales[Code]))

@arvindarvind24  can you improve this .

View solution in original post

8 REPLIES 8
Mahesh0016
Super User
Super User

Mahesh0016_0-1671788289307.png

@arvindarvind24 

>>Create 1 index column called "Sales Index" in Sales table in Power Query.

>>Create 1 index column called "GRC Index" in GRC table in Power Query.

>>Create this calculated column in the Sales Table.

Note : this solution only work on Index Column If you change your data so may be this solution is not work.

Mahesh0016
Super User
Super User

@arvindarvind24 

>> Create New Column.

date =lookupvalue(Grc[Grc Date],Grc[Code],Sales[Code])

If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @Mahesh0016 

 

LookupValue work which has direct relationship with each other.

Mahesh0016
Super User
Super User

@arvindarvind24  which table reference to create date column.

HI @Mahesh0016 

 

  From GRC to Sales Table.

Hello @arvindarvind24 ,

Good Morning

please can you share pbi ZIP file 

GRC Date = CALCULATE(
   MIN(GRC[date]),
   FILTER(GRC,GRC[code]=Sales[Code]))

@arvindarvind24  can you improve this .

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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