Forum Discussion

Pikachu-Power's avatar
Pikachu-Power
Icon for Impactful Individual rankImpactful Individual
5 years ago

Total in every row

hi,

 

i have a simple formula where i want the total in every row but it dont work:

 

XYZ = CALCULATE(SUM(Table[Number]), ALL(Table[ABC_Categorie]))
 
ABC_Categorie is a created COLUMN with Categories A, B, C as variable.
 
I use a table with the columns ABC_Categories and so on...
 
🤔
 
 

4 Replies

  • Pikachu-Power , Try like

     

    Grand total

    XYZ = CALCULATE(SUM(Table[Number]), ALL(Table))
    XYZ = CALCULATE(SUM(Table[Number]), ALLSELECTED(Table))

     

    or sub total
    XYZ = CALCULATE(SUM(Table[Number]), ALLexpect(Table,Table[ABC_Categorie]))

    • Pikachu-Power's avatar
      Pikachu-Power
      Icon for Impactful Individual rankImpactful Individual

      Ok I didnt use ALL(Table) because I have a time filter at the filter pane where I want to use further. But I include it in the formula.  

      • amitchandak's avatar
        amitchandak
        Icon for Super User rankSuper User

        Pikachu-Power , The best way to ignore only the category is to have that in a separate table joining to the fact. So you can use all on that table and another filter can work.

         

        you can try this and check,

        XYZ = CALCULATE(SUM(Table[Number]), removefilters(Table[ABC_Categorie]))

         

        new Table wat

        XYZ = CALCULATE(SUM(Table[Number]), all(Categorie[ABC_Categorie]))

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Pikachu-Power ,

     

    Do you want totals for row or for columns? Can you share some sample data and expected result to us?

     

    Best Regards,

    Jay