Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Calculating Percentages

So I have this calculated table (I derived the table using a CALCULATE()), that looks like this.   Dept Location No of Ppl Sales USA 40 Sales Denmark 20 Sales Sweden 40 Sales...
  • Sean's avatar
    9 years ago

    Anonymous

    Okay if you really want COLUMNS here are those formulas...

     

    Total People COLUMN = CALCULATE ( SUM ( 'Table'[No of Ppl] ), ALLEXCEPT('Table', 'Table'[Dept]) )
    
    Percentage COLUMN = DIVIDE ( 'Table'[No of Ppl], 'Table'[Total People COLUMN], 0 ) 

    But in case you want MEASURES

     

    Total People MEASURE = CALCULATE ( SUM ( 'Table'[No of Ppl] ), ALLEXCEPT('Table', 'Table'[Dept] ) )
    
    Percentage MEASURE = DIVIDE ( SUM('Table'[No of Ppl]), [Total People MEASURE], 0) 

    Hope this helps!

    Good Luck! :smileyhappy: