Forum Discussion
Calculation groups in Power BI
I have two calculation groups
Calculation group 1
| Name | Jan-24 | Feb-24 | Mar-24 | Apr-24 | May-24 | TotalC | TotalB | TotalA | Rate |
| ewrr | 1 | 2 | 3 | 4 | 4 | 14 | 867 | 80 | 36.36% |
Calculation group 2
| Name | Jan-24 | Feb-24 | Mar-24 | Apr-24 | May-24 | TotalC | TotalB | TotalA | Rate |
| wdw dnwu | 34 | 9 | 12 | 6 | 7 | 68 | 56 | 42 | 66% |
I used calculation groups because i needed the totals in red to be at the end of my table.
Now i want to put it together in a visual to achieve one table stacked together.
| Name | Jan-24 | Feb-24 | Mar-24 | Apr-24 | May-24 | TotalC | TotalB | TotalA | Rate |
| ewrr | 1 | 2 | 3 | 4 | 4 | 14 | 867 | 80 | 36.36% |
| wdw dnwu | 34 | 9 | 12 | 6 | 7 | 68 | 56 | 42 | 66% |
Hi Preboat
I am assuming each column in your sample tables is a calculation item. If so, that is a lot of work and if there are more months then you will need to add them manually.
I would use a combination of a calculation group for the calculation and a disconnected table for the column headers.
Please see the attached pbix.
5 Replies
- danextianSuper User
Hi Preboat
I am assuming each column in your sample tables is a calculation item. If so, that is a lot of work and if there are more months then you will need to add them manually.
I would use a combination of a calculation group for the calculation and a disconnected table for the column headers.
Please see the attached pbix.
- Greg_DecklerCommunity Champion
Preboat Not entirely sure, but perhaps you need something like this?
The New Hotness (Custom Matrix Hierarchy) - Microsoft Fabric Community
- PreboatFrequent Visitor
Hi Greg_Deckler thanks for responding with a possible solution. I am going to try this.
Thanks
- PreboatFrequent Visitor
Hi Greg_Deckler if i want to change the date and work with codes. Do i need to create the same custom hierarchy especially when i have more than 100's of codes. Do you have a way to reference these codes in the switch statment rather than referencing it individually? Thank you