Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Sum Total based on Columns

Hello All,

 

How can I achieve the outcome listed below for Total Capacity? I am using a matrix table and I want to add a column like Total Capacity below that shows the Job Cap total based on Employee. Is this possible? 

 

EmployeeJob CapTotal Capacity
A25100
A25100
A25100
A 25100
B4080
B4080
C2060
C2060
C2060
D1050
D1050
D1050
D1050
D1050
F3030
  • Hi, Anonymous ;

     

    In the image above,  can you share yours [Planner] column?Because this is a  [Planner] column grouping.

    Base on the example you offered. You could try this dax.

    Total capacity 2 = CALCULATE(SUM([Job Cap]),ALLEXCEPT('Table','Table'[Employee]))

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

11 Replies

  • Try this:

     

    Total Capacity = CALCULATE(
    SUM(Tabla[límite de trabajo]), ALL(Tabla[Empleado]))

    • Anonymous's avatar
      Anonymous
      Not applicable

      This did not work for me. The results are the same as the job cap.

      • ddpl's avatar
        ddpl
        Icon for Solution Sage rankSolution Sage

        this is result you want right??

         

         

  • Hi,

    Write this calculated column formula

    Total capacity = calculate(sum(Data[job cap]),filter(Data,Data[Employee]=earlier(Data[Employee])))

    Hope this helps.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      This didnt work for me. Getting an error EARLIER/EARLIEST refres to an earlier row context which doesnt exist. 

       

      FYI - The rows might not necessarily be sequential by employees. They are not in specific orders if that helps.

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

        Share the link from where i can download your PBI file.

  • ddpl's avatar
    ddpl
    Icon for Solution Sage rankSolution Sage

    Hi Try this one

    Column =
    CALCULATE ( SUM ( 'Table'[Job Cap] ), DISTINCT ( 'Table'[Employee] ) )
     
    ==Mark solution as accepted if its worked
    • Anonymous's avatar
      Anonymous
      Not applicable

      The result is the same as job cap and not the total.