Forum Discussion

Preboat's avatar
Preboat
Frequent Visitor
1 year ago
Solved

Calculation groups in Power BI

I have two calculation groups 
Calculation group 1

NameJan-24Feb-24Mar-24Apr-24May-24TotalCTotalBTotalARate
ewrr 12344148678036.36%


Calculation group 2

NameJan-24Feb-24Mar-24Apr-24May-24TotalCTotalBTotalARate
wdw dnwu349126768564266%



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.

NameJan-24Feb-24Mar-24Apr-24May-24TotalCTotalBTotalARate
ewrr 12344148678036.36%
wdw dnwu349126768564266%
  • 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

  • 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.

    • Preboat's avatar
      Preboat
      Frequent Visitor

      danextian instead of category at the end of the table is it possible to have it as different measure totals?

    • Preboat's avatar
      Preboat
      Frequent Visitor

      Hi Greg_Deckler thanks for responding with a possible solution. I am going to try this. 
      Thanks

  • Preboat's avatar
    Preboat
    Frequent 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