Forum Discussion

nataliesmiy1357's avatar
2 years ago
Solved

My Sums Not Working

Hello!  For some reason, my sums are not working.  I have all of my data that is looking correct, but when I turn on the my sums for the columns, they are super small.  

 

Wondering why this is happening?

 

 

2 Replies

  • Hello! Right now, the measure you have is taking the Total Assembly and dividing by the shifts (I would suggest removing the divide operator and using the DIVIDE function instead and I would suggest making individual measures for the two parts of the current measure - see below), so the total line is doing that as well. If you want the individual rows to sum you will need to use SUMX. You can try this for the SUMX: 

    Total_Assembly_Divided_By_Shifts =
    VAR TotalAssembly = [Total Assembly A TWT]
    VAR TotalShifts = [Number of Shifts]
    RETURN
    SUMX(
    ALL('YourTable'), -- Replace with your actual table name
    DIVIDE(TotalAssembly, TotalShifts)
    )

    Total Assembly A TWT = SUM('Merge1'[Total Assembly A TWT])

    Number of Shifts = SUM('Merge1'[Number of Shifts])

    USE Total Assembly A TWT = DIVIDE([Total Assembly A TWT],[Number of Shifts]