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
PowerBIIE
Frequent Visitor

Last Delivered Date

Hi,

 

I need to create a report that shows what has been delivered filtered by date, which is easy but it does not show what has not been delivered as it does not have a date. So I need to create a calculated column, I saw that another post has this measure which is great but it's not what im looking for as if I use this in a column it retrieves the last date of the last order for all orders. 

 

last delivery date =

CALCULATE (

    MAX ( 'Delivery Information'[Delivery Date] ),

    ALL ( 'Delivery Information' ),

    'Delivery Information'[Order] IN DISTINCT ( Orders[Order] )

)

 

I have two tables, one called Orders with the order number, Order Qty and Ship Qty and another called OrderReceive with the Order Number, Ship Qty and Date Received.

 

I have merged the date from OrderReceive to Orders.

 

I need a calculated column for the last delivery date. Can anyone help me?

 

 

4 REPLIES 4
Icey
Community Support
Community Support

Hi @PowerBIIE ,

 

Have you tried to use RELATED() function like below to create a calculated column in table "Orders"?

Related Date Received =
RELATED ( 'OrderReceive'[Date Received] )

 

 

Best Regards,

Icey

 

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

PowerBIIE
Frequent Visitor

No that is not what I am looking for

PowerBIIE
Frequent Visitor

When I say the stuff not delivered, I am talking about partial deliveries, orders that have not been fully fulfilled

calerof
Impactful Individual
Impactful Individual

Hi @PowerBIIE ,

If you use the calculated column shown by @Greg_Deckler in this post you can have the orders pending:

https://community.powerbi.com/t5/DAX-Commands-and-Tips/Need-to-Match-Quantities-Supplied-vs-Ordered/... 

And it will look like this:

error1.png

The code is:

Full Order = 
VAR __SuppliedQuantity =    
SUMX(
    FILTER(
         Table_Order,
         Table_Order[Order Number] = EARLIER(Table_Order[Order Number])
    ),
    Table_Order[Ship Quantity]
)
RETURN
  IF( Table_Order[Order Quantity] = __SuppliedQuantity,1,0)

If this is what you were looking for, please accept it as a solution.

Regards,

Fernando

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.