5 Replies Latest reply on Feb 15, 2016 7:23 PM by lei.chen.0

    Calculated field using string formula?

    Dan Armstrong



      I have a dimension called "Gender" with two possible values: "M" and "F". One of my views (below) uses a table calculation to show the gender breakdown of about 400 government organizations.


      I want to sort the organizations by the proportion of male or female employees.



      I created a calculated field called "% male" to sort on. The formula is:


      count([Gender]="M")/[Number of Records]


      I've also tried a lot of variations in case my syntax is off - more parentheses, single rather than double quotes, things like that. But in the end this formula always yields a value of 1. The numerator yields the same value as the denominator.


      Does anyone have any idea why this formula doesn't work and how I might create one that does?


      Thank you.