Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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
any ideas?
Solved! Go to Solution.
Hi,
So what you want is a sum wit distinct conditions? Here is the basic pattern for that:
Data:
Dax:
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!
Proud to be a Super User!
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]))
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.
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]))
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.
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?
Hi,
So what you want is a sum wit distinct conditions? Here is the basic pattern for that:
Data:
Dax:
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!
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.
User | Count |
---|---|
14 | |
10 | |
7 | |
6 | |
5 |
User | Count |
---|---|
30 | |
19 | |
12 | |
7 | |
5 |