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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
mzucarelli
Regular Visitor

Unique shipping cost with same orders numbers

Hello, 

 

I have a file with orders and their shipping cost.  There can sometimes be more than 1 line with the same order number and shipping cost.  

 

I need to only count the shipping cost for 1 of these items so the shipping cost doesn't increase when more lines are there. but i can't remove duplicates from the sheet

 

mzucarelli_0-1642707999398.png

 

any ideas? 

 

 

2 ACCEPTED SOLUTIONS
ValtteriN
Super User
Super User

Hi,

So what you want is a sum wit distinct conditions? Here is the basic pattern for that:

Data:

ValtteriN_0-1642710324841.png


Dax:

Measure 10 = SUMX(
SUMMARIZE(ShippingDuplicates,ShippingDuplicates[PO],"Value",max(ShippingDuplicates[Cost])),[Value])

End result:

ValtteriN_1-1642710350257.png

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!





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

Proud to be a Super User!




View solution in original post

Anonymous
Not applicable

Hi @mzucarelli ,

 

According to your description, you want to keep only one row for each Customer with the same ShipDate,right?

If so, please try the following formula to create a new table:

New Table = DISTINCT( SELECTCOLUMNS('Table',"CustomerPO",[CustomerPo],"ShipDate",[ShipDate].[Date],"Shipping Cost",[Shipping Cost]))

 

Eyelyn9_0-1643092201322.png

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

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @mzucarelli ,

 

According to your description, you want to keep only one row for each Customer with the same ShipDate,right?

If so, please try the following formula to create a new table:

New Table = DISTINCT( SELECTCOLUMNS('Table',"CustomerPO",[CustomerPo],"ShipDate",[ShipDate].[Date],"Shipping Cost",[Shipping Cost]))

 

Eyelyn9_0-1643092201322.png

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

 

VahidDM
Super User
Super User

HI @mzucarelli 

 

You can remove those duplicate rows with SUMMARIZE, but what is the final output? Do you want to sum the shiiping cost or you want to know the number of the orders?

New Table = SUMMARIZE(Shipping,Table[CustomerPO],Shipping[Shipping Cost])
 


Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/


 

 

ValtteriN
Super User
Super User

Hi,

So what you want is a sum wit distinct conditions? Here is the basic pattern for that:

Data:

ValtteriN_0-1642710324841.png


Dax:

Measure 10 = SUMX(
SUMMARIZE(ShippingDuplicates,ShippingDuplicates[PO],"Value",max(ShippingDuplicates[Cost])),[Value])

End result:

ValtteriN_1-1642710350257.png

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!





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

Proud to be a Super User!




Thanks for the reply, 

 

I tried that - there are no errors, but it doesn't product anything.  the visual will error.

mzucarelli_0-1642712531994.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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