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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Yasser92
Frequent Visitor

Remove duplicate rows from a calculate table

Hi! 

 

Someone helps me to remove duplicate rows from a calculate Table and take the max value of "Delivery date" for each Order-Line ; 

 

In my case, this is the calculate table  : 

 

Order NoLine NoDelivery Date 
AAAA106/20/2018
AAAA206/20/2018
AAAA206/20/2018
AAAB106/22/2018
AAAC106/20/2018
AAAA306/20/2018
AAAB106/15/2018
AAAB106/20/2018
AAAC306/20/2018

 

and the result that i'm looking for is below  : 

 

Order NoLine NoDelivery Date 
AAAA106/20/2018
AAAA206/20/2018
AAAB106/22/2018
AAAC106/20/2018
AAAA306/20/2018
AAAC306/20/2018

 

Thank you

1 ACCEPTED SOLUTION
dedelman_clng
Community Champion
Community Champion

Unique =
SUMMARIZE (
    Orders,
    Orders[Order],
    Orders[Line],
    "Delivery Date", MAX ( Orders[DelDate] )
)

Hope this helps,

David

View solution in original post

6 REPLIES 6
v-yuta-msft
Community Support
Community Support

Hi Yasser92,

 

What I would add is there's a simpler way in power bi to achieve this. Click Editor Queries-> click on column [Order No], [Line No] and [Delivery Date]-> click Remove Rows-> select Remove duplicates.

Before:

1.PNG 

After:

2.PNG 

 

Hope it's helpful to you.

Jimmy Tao

@v-yuta-msft -

 

@Yasser92 was asking to remove duplicates for Order-Line and displaying the Max delivery date.  Query Editor would not be able to provide that (note that you have 3 rows for Order AAAB, Line 1)

dedelman_clng
Community Champion
Community Champion

Unique =
SUMMARIZE (
    Orders,
    Orders[Order],
    Orders[Line],
    "Delivery Date", MAX ( Orders[DelDate] )
)

Hope this helps,

David

Thank you lot @dedelman_clng 

My situation is more complicated then that, cuz my table is not a data but a GENERATE (Table1;Table2).

I'll try to post the complete case, hoping that someone will help me.

 

 

@Yasser92 you should be able to do a calculated table (SUMMARIZE retruns a table) against other calculated tables.

Thank you lot @dedelman_clng

It's Working 😄

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.