Forum Discussion
Calculated Table Dax Code using Rollup needs Subtotal labels and sorting
- 1 year ago
Hi AndreasHermle,
Thank you for reaching out to the Microsoft fabric community forum.
This is a work around you can go with this:You can use the GROUP BY feature in Power Query to calculate total sales for each Country and Category. Then, create subtotals by grouping just by Country and label these as "Subtotal." Finally, add a row for the overall total labeled "Total." Combine all these results into one table and sort it so the subtotals appear under each Country group for a clear summary.
You can find official documentation and screenshot here for reference:How to GROUP BY or summarize rows - Power Query | Microsoft Learn
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Harshitha.
Community Support Team.
Hai
Could you please send the pbix file with some sample data hiding more sensitive data
- AndreasHermle1 year agoRegular Visitor
HI Learner, thank you very much for your offer. Great I will do that. Thank you very much again.
- AndreasHermle1 year agoRegular Visitor
Hi Learner,
now here comes the file. Your code is integrated in a calculated table, named 'SalesSummary' and is the second last calculated table at the bottom of the Data Pane. These sales figures along with other elements are all ficticious, so no need to hide any sensitive data.
Thank you very much in advance.
Oh, I am just looking for an icon to press so that I can upload my file. I cannot find one. I need to find out ...
Best Regards, Andreas - AndreasHermle1 year agoRegular Visitor
Hi Learner,
here you go. Thank you very much in advance for your valuable help. As I said before, your calculated table code is called SalesSummary, the second last calculated table in the Data Pane.
https://drive.google.com/file/d/1MZjESs6GEcGij_SvBYU6e42t1nGlqY8W/view?usp=sharing- v-hjannapu1 year agoCommunity Support
Hi AndreasHermle,
Thank you for reaching out to the Microsoft fabric community forum.
This is a work around you can go with this:You can use the GROUP BY feature in Power Query to calculate total sales for each Country and Category. Then, create subtotals by grouping just by Country and label these as "Subtotal." Finally, add a row for the overall total labeled "Total." Combine all these results into one table and sort it so the subtotals appear under each Country group for a clear summary.
You can find official documentation and screenshot here for reference:How to GROUP BY or summarize rows - Power Query | Microsoft Learn
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Harshitha.
Community Support Team.
- AndreasHermle1 year agoRegular Visitor
Dear Har**bleep**ha,
thank you very much for your great help. I wilm give it a try, as soon as I get home frm my vacation. Thank you, best regards, Andreas