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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
LisaChung
Frequent Visitor

Dax help : advanced date allocation between tables

Hi,

 

I would like to generate "Fulfill date" in table 1. Table 1 is the sales order by its site, sales order, line and SKUs.

It lists down the date that customers would like to deliver. So in table 1, the earliest date for each order line will be my priority to fulfill orders.  And table 2 is the estimation "shipped date" of  each batch of shipment. The scenario is that I would like to base on the priority of customer order (table 1) to map the "Ship date" (table 2) from the earliest to the latest in "Fulfill date."

 

Help needed for Power BI experts. Thanks.

 

 

Table 1:

CustomerSiteSales OrderLineSKUDateqtyAggregated_QtyFulfill dateRemarks
AUSA123D1JJ2022-06-10200022502022-07-10Priority 1 order : first date of Ship Date
BUSB125D3JJ2022-06-2120022502022-07-21Priority 2 order : second date of Ship Date
BUSB125D3JJ2022-07-215022502022-08-21Priority 3 order : third date of Ship Date

 

 

Table 2:

BatchSiteSKUShip DateQty
1USJJ2022-07-102000
2USJJ2022-07-21200
3USJJ2022-08-2150
1 ACCEPTED SOLUTION
vapid128
Solution Specialist
Solution Specialist

table 1 

add colnum

Batch = rankx(filter(table 1,Site=eariler(Site) && SKU = eariler(SKU), Date,Date,asc)

 

add colnum

index = Batch & SKU & Site

 

table 2 

 

add colnum

index = Batch & SKU & Site

 

link 2 index colnum

View solution in original post

3 REPLIES 3
vapid128
Solution Specialist
Solution Specialist

table 1 

add colnum

Batch = rankx(filter(table 1,Site=eariler(Site) && SKU = eariler(SKU), Date,Date,asc)

 

add colnum

index = Batch & SKU & Site

 

table 2 

 

add colnum

index = Batch & SKU & Site

 

link 2 index colnum

@vapid128 thanks. You save my day.

tamerj1
Super User
Super User

Hi @LisaChung 

sorry but I did not understand what are the expected results

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors