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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
dogburalHK82
Helper III
Helper III

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.

 

dogburalHK82_0-1684280750437.png

 

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?

dogburalHK82_1-1684280829340.png

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 3
dogburalHK82
Helper III
Helper III

not sure how I can acheive using calculated column

@dogburalHK82 check below official Microsoft link. On Step 5 there is example how to use IF function to get some of your status.

https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-tutorial-create-calculated-column... 





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

Proud to be a Super User!






some_bih
Super User
Super User

Try Calculated column in your table  with IF statement for your wanted status, like INT(Promised Date - Delivery Date. I hope this help.





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

Proud to be a Super User!






Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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