Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
Hi all,
I would like to sum the values in the column "amount" for all unique values in column "merchant-order-id" and only keep the uniqe value of "merchant-order-id" with the summed "amount".
I hope my question is clear. Thank you!
Solved! Go to Solution.
Yes. Just add all the columns you want to keep here:
NewTable = SUMMARIZE(YourTable, YourTable[merchant-order-id], COLUMN1, COLUMN2, "Amount", sum(YourTable[Amount]))
PS.: if you think my answer solves your problem, don't forget to mark the post as solution. 🙂
Regards.
Hi pedrams.
SUMMARIZE function can do that to you. Docs and samples here: https://msdn.microsoft.com/en-us/query-bi/dax/summarize-function-dax
At a glance, just go to "Modeling" and select "New Table". For your sample data it would be something like:
NewTable = SUMMARIZE(YourTable, YourTable[merchant-order-id], "Amount", sum(YourTable[Amount]))
In the formula above, "YourTable" should be changed to your current data table, which you did not mention. "New Table" could be renamed to anything you like.
Regards.
Hi Marco,
thank you for the solution. But I lose all the other columns, how can I keep all the other columns?
Best,
Pedram
Yes. Just add all the columns you want to keep here:
NewTable = SUMMARIZE(YourTable, YourTable[merchant-order-id], COLUMN1, COLUMN2, "Amount", sum(YourTable[Amount]))
PS.: if you think my answer solves your problem, don't forget to mark the post as solution. 🙂
Regards.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
76 | |
59 | |
35 | |
33 |
User | Count |
---|---|
100 | |
62 | |
56 | |
47 | |
41 |