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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Data:
Each 'Code' has multiple 'Amount' in a month. E.g. 1001 has two entries of 10 and 20 on 31st January.
| Code | Date | Amount |
| 1001 | 31/1/19 | 10 |
| 1001 | 31/1/19 | 20 |
| 1001 | 28/2/19 | 15 |
| 1001 | 28/2/19 | 25 |
| 1002 | 31/1/19 | 30 |
| 1002 | 31/1/19 | 40 |
| 1002 | 28/2/19 | 15 |
| 1002 | 28/2/19 | 25 |
Requirement:
I want to make my data unique on the basis of 'Code' and 'Date' so that each 'Code' has one entry for each 'Date' and the 'Amount' is totalled up into a new column 'SubTotal'
| Code | Date | SubTotal |
| 1001 | 31/1/19 | 30 |
| 1001 | 28/2/19 | 40 |
| 1002 | 31/1/19 | 70 |
| 1002 | 28/2/19 | 40 |
I need to do this in Power Query.
Thank you!
Solved! Go to Solution.
hi @danialsj
that's pretty much easy
right click on the Code field. then "Group by" then Advanced then Add grouping and Sum of Amount as new column. like this
do not hesitate to give a kudo to useful posts and mark solutions as solution
hi @danialsj
that's pretty much easy
right click on the Code field. then "Group by" then Advanced then Add grouping and Sum of Amount as new column. like this
do not hesitate to give a kudo to useful posts and mark solutions as solution
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 66 | |
| 44 | |
| 40 | |
| 29 | |
| 19 |
| User | Count |
|---|---|
| 200 | |
| 126 | |
| 103 | |
| 70 | |
| 53 |