Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have a table like below
Item | discount rate | price |
Tesla | 0.2 | 150 |
Ferrari | 0.3 | 200 |
Honda | 0.4 | 100 |
Tesla | 0.2 | 300 |
Ferrari | 0.3 | 400 |
As shown above, the "item" column will have duplicate value.
I would like to find a way to aggregate those rows based on the "item" column, and sum all the prices.
However, I want to keep all the other columns still there, which means the "discount rate" value remains the same.
Resulting in the below
Item | discount rate | price |
Tesla | 0.2 | 450 |
Ferrari | 0.3 | 600 |
Honda | 0.4 | 100 |
Is there a way to do that in power query?
Alternatively, I think the discount rate can be summed up as well, but in the end I need to divide it back according to the number of count it was aggregated with. Not sure if that would work
Solved! Go to Solution.
Hi @npust333, you can do simple Group By:
If you want to consider also unique discount rate, click to Advanced and add discount rate to groping. (This preserves also discount rate column)
Hi @npust333, you can do simple Group By:
If you want to consider also unique discount rate, click to Advanced and add discount rate to groping. (This preserves also discount rate column)