6 Replies Latest reply: Mar 5, 2015 4:18 PM by Massimo Grossi RSS

    Trouble with count DISTINCT

      I'm bumbling my way through using expressions as measures for bar charts, and so far I have the following working expression, which counts people based on specific values for two different fields:

       

      count({$<[Past Rank]={"MS","PhD"}, [Role]={"Camper"}>} [Past Rank])

       

      The source data (uploaded from an xls file) contains multiple lines per person, so now I'm trying to figure out how to adjust the expression shown above so that it only counts each person once.  I'm guessing that I need to somehow specify that the count should look at the [Person ID] field and use the word DISTINCT.  However, I'm at a loss as to how to do that.

       

      My attempt below does NOT work:

      count({$<[Past Rank]={"MS","PhD"}, [Role]={"Camper"}>} DISTINCT [Person ID])


      I'm still fairly new and I'm having trouble figuring out the syntax.


      Thanks!


      Tom