5 Replies Latest reply: Apr 11, 2016 11:37 AM by Sunny Talwar RSS

    Right count of distinct values within chart expression

      Hi, I'm new to Qlikview but am struggling a little on one aspect of a chart.


      I have data that includes an ID code, company name and company postcode that I'm trying to sort by a count of postcodes for each sales rep that has been visited.  ID codes are not unique as if more than one market is discussed there is another report with the same ID, therefore a single visit to a customer can have 2 rows for the same ID.


      The expression I had tried was COUNT(RIGHT(DISTINCT(ID-AREA,2))) which didn't work, I'm trying to find a solution to get a count of how many visits to each postcode the rep has done.


      Any help much appreciated, a simplified version of my data is below


      IDCompanyPostcodeMarketID-AREASales Rep
      100Bob BuildersEXEurope100EXGeorge
      100Bob BuildersEXUSA100EXGeorge
      101Claires CatsBAEurope101BAGeorge
      102Dapper DansBSEurope102BSGeorge
      104Bob BuildersEXAsia104EXGeorge




      Below are my current results with counts and my required results


      Current CountReq'd Count