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
PBIUWO
Helper III
Helper III

Sum of quantity filtered by the Earliest date per Order

Hi,

 

I am trying to create a way to measure what the % of quantity received is in the earliest Shipping Date by Order Number when compared to the total quantity of the Order Number. 

 

I am trying to get the sum of the quantity (QTY) and to only take the Earliest date of the Shipping ID per Order. 

Then to figure out how to sum the quanity (QTY) per Order Number. From this to be able to divide the two measurements and get the % average of the quantity received in the earliest Shipping ID/Shipping Date. 

 

12.PNG

 

From this Example, Order Number, "1"  has 2 different Shipping ID (123, and 234) that totals 10 QTY. The earliest Shipping Date is "1/2/2019" and is Shipping ID "123". So the quantity on the earliest date is 6, so the % of quantity received on the earliest date is 60%. 

 

Thank you in Advance,

1 ACCEPTED SOLUTION

I have solved this on my own. 

 

Thanks

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Show the exact layout of your expected result.  Also, share data in a format that can be pasted in MS Excel or share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Order NumberItem CodeShipping IDQTYShip Date
1A112331/2/2019
1A212331/2/2019
1B323441/6/2019
2B425551/5/2019
2B625551/5/2019
2D534421/8/2019
2F534421/8/2019
3G164411/9/2019
3H445621/10/2019
3H645631/10/2019

 

 

 

Expected result, 

 

Order NumberItem CodeShipping IDQTYShip DateExpected Result
1A112331/2/20196
1A212331/2/20196
1B323441/6/20196
2B425551/5/201910
2B625551/5/201910
2D534421/8/201910
2F534421/8/201910
3G164411/9/20191
3H445621/10/20191
3H645631/10/20191

I have solved this on my own. 

 

Thanks

@PBIUWO 

 

Glad to hear that. By the way, you may share the solution here. Your contribution is highly appreciated.

Column =
SUMX (
    TOPN (
        1,
        FILTER ( Table1, Table1[Order Number] = EARLIER ( Table1[Order Number] ) ),
        Table1[Ship Date], ASC
    ),
    Table1[QTY]
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.