Forum Discussion

dogburalHK82's avatar
dogburalHK82
Icon for Helper III rankHelper III
3 years ago

merge rows using DAX

Hi, 

 

I have purchase order with receipt date and expected date. Now I am trying to evaulate supplier's devliery performace.

 

 

At the end I would like to count as below using DAX, rather than sorting them out in power query using Grouping rows.

How can I merge rows using Dax and extract as below?

Each column definition as below

  • OnTime(any)
    • any delivery arrived before promised date regardless of partial or full amount and quality of part.
    • In this case, PO111, PDN_3 and PDN_2 as well as PDN_1.
    • PO222, PDN_5 and PDN_4

 

  • OnTime
    • any delivery arrived before promised date regardless of partial or full amount - but should be a good part
    • In this case, PO111, PDN_3 and PDN_2 as well as PDN_1
    • PO222, none (because it becomes negative receipt quantity, ended up with backorder qty of 1

 

  • OnTimeInFull
    • any delivery arrived before promised date and in a full amount with correct part
    • In this case, PO111, PDN_2 and PDN_1
    • PO222, none

 

  • Late
    • any delivery arrived after promised date
    • In this case, PO111, PDN_3 (because it was partial deliver and balance arrived after promised date)
    • PO222, PDN_4 and PDN_5

 

  • QualityError
    • any delivery with incorrect (poor) quality part
    • In this case, PO111, none
    • PO222, PDN_4 and PDN_5

 

3 Replies