0 Replies Latest reply: Jun 20, 2018 11:39 AM by Jeremiah Bakerstull RSS

    Question related to distinct count

    Jeremiah Bakerstull

      Below is very small sample of my data set.


      I know that I can use distinct count to display total client count of 3.


      What I'm trying to accomplish is creating a set analysis that is able to count distinct clients based on where the minimum date matches the entry date. With some help within qlik community, I was able to create a column identifier to show which row is client's first entry in the data set. 


      All our outcome counts are based on client's first or last entry (service). A client may go in and out of program 20 times within a time period. My goal is to create a set analysis that counts first entry (Min) and then add an identifier to count specific outcomes.


      Count({<IsCurrent={$(=If([Entry Date]=Min(total[Entry Date])))}>}Distinct[Client Id]),


      For example, I'm trying to show a total count of 3 for streets.    


      Client IdEntry Exit Provider NameEntry DateExit Date AdjustedMin Entry
      758LSS - FM Faith on 6th3/22/20184/5/2018YesStreet
      758LSS - FM Faith on 6th4/7/20184/12/2018NoRefused
      758LSS - FM Faith on 6th4/26/20186/4/2018NoRental
      2134LSS - FM Faith on 6th3/30/20186/15/2018YesStreet
      2517LSS - FM Faith on 6th3/9/20185/9/2018YesStreet