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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

Connection between customer table and orders table

Hi there,
I am trying to figure it out how to associate between customer order date to customer address
this is the customer table:

guy2233_0-1693245222008.png

Each customer has a number of records following an address update, distinguished by an update date.
this is the order table:

guy2233_1-1693245408756.png

I would like to combine combine order table with the customer table to get the appropriate address for that order date.

 

the output sholud look like this:

guy2233_3-1693246134067.png

 

 

Thanks in advanced.

3 REPLIES 3
MFelix
Super User
Super User

Hi @Anonymous ,

 

Do you want to have the information in a table visualization so that you can have a list of adresses or do you want to have the information in a table so you can use it in your dataset in a different way?


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Hi @MFelix ,

I would like to the the information in the Orders Table so I can use it on the data set.

 

Hi @Anonymous ,

 

For this you need to create a custom function something similar to this:

 

(OrderDate as date, customerid as text) =>

let
    Source = Customers,
    #"Filtered Rows" = Table.SelectRows(Source, each [Dateupdated] <= OrderDate and [Customer ID] = customerid),
    #"Sorted Rows" = Table.Sort(#"Filtered Rows",{{"Dateupdated", Order.Descending}}),
    #"Kept First Rows" = Table.FirstN(#"Sorted Rows",1)
in
    #"Kept First Rows"

 

 

This function gets the information from your customers table and then filter out the latest result based on the order date.

 

Then you just need to use it has a new column on your order table and expan the result for your needs:

MFelix_0-1693827478032.pngMFelix_1-1693827489486.pngMFelix_2-1693827501032.png

 

In my example I only have city but you can expand all the columns.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



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