2 Replies Latest reply: Jul 31, 2018 8:05 AM by Manoj Kumar M R RSS

    Percentage calculation with filter condition

    Manoj Kumar M R

      Hi All,

       

      I need to calculate percentage of number employees in HR department (wrt to all employees) and % of sum of salary in HR dept (wrt to all employees). So I'm writing an expression like below, but it is not giving correct result.

       

      (count({<Dept={'HR'}>}Id)/count({<Dept={'HR'}>}Total(Id)))*100

       

      (Sum({<Dept={'HR'}>}[salary])/Sum({<Dept={'HR'}>}Total([salary])))*100