Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
How to combine duplicate rows and sum its values
Example of my table
Category | Items | Items Count | Sell Date |
Fruits | Apple | 3 | 29/10/2021 |
Fruits | Apple | 2 | 29/10/2021 |
Vegetable | Carrot | 3 | 29/10/2021 |
Vegetable | Carrot | 2 | 29/10/2021 |
Fruits | Apple | 1 | 30/10/2021 |
I need to get my table like this:
Category | Items | Items Count | Sell Date |
Fruits | Apple | 5 | 29/10/2021 |
Vegetable | Carrot | 5 | 29/10/2021 |
Fruits | Apple | 1 | 30/10/2021 |
How i can i acheive this?
Solved! Go to Solution.
Oh okay, In that case you can follow below steps:-
1. Click on group by option in edit query window:-
2. Then select column as below and click OK:-
3, You will see below output and then click on close and apply:-
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Maggi029 ,
You can achive this by below two ways:-
1. Drag your column on table visual and use item count as sum
2. Or You can create a custom table with below code:-
Table 2 =
SUMMARIZE (
'Table',
'Table'[Category],
'Table'[Items],
'Table'[Sell Date],
"sum", SUM ( 'Table'[Items Count] )
)
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Samarth_18
Thanks for your response; it appears to be satisfactory; however, I must continue to use the old table in my project, as this will increase my pbix weight. My main goal is to reduce my pbix size, and to do so, I must trim down the table.
Oh okay, In that case you can follow below steps:-
1. Click on group by option in edit query window:-
2. Then select column as below and click OK:-
3, You will see below output and then click on close and apply:-
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hello @Maggi029
You can create a simple measure and plot in the table/matrix.
Hi @Anonymous
No instead of measure, i need to trim down my table rows count, for i need to combine my rows
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |