Forum Discussion

rosscortb's avatar
rosscortb
Post Patron
7 years ago
Solved

Help with Division

Hello,

 

I want to create a column that shows

 

Total Absence Days by month divided by Total Headcount by month.

 

I have so far. Any help would be appreciated.

 

Total Days Lost Per Person = CALCULATE(SUM('DB Absence'[Total absence days]('Month'[Month]/CALCULATE(Sum('DB Headcount'[ID]('Month'[Month]))))))

 

Thanks

Ross

  • in the first sum after the column name you close the function with ) ? 


5 Replies

  • rafaelmpsantos's avatar
    rafaelmpsantos
    Responsive Resident

    Only this

    divide(SUM('DB Absence'[Total absence days]),Sum('DB Headcount'[ID]))

    You will use MONTH in X axis of a chart or in the column item for a matrix or table, not in the measure syntax

    • rosscortb's avatar
      rosscortb
      Post Patron

      I get the below.

       

      Too many arguments were passed to the SUM function. The maximum argument count for the function is 1.

      • rafaelmpsantos's avatar
        rafaelmpsantos
        Responsive Resident

        in the first sum after the column name you close the function with ) ?