4 Replies Latest reply: Jul 7, 2016 6:28 AM by Prahlad Rao RSS

    Count using set analysis

    Prahlad Rao


      I need to show the count of customers in qlik sense KPI


      To find out the account opened in the last 7 days:

      The query which is run on my db is below


      select count(a."Customer") from "Casa" a, "DimBranch" b where b."ApplicationDate" >= a."DateTDOpen" AND b."ApplicationDate"- a."DateTDOpen"<=7

      result when this query is run on my db >>>14061



      set analysis expression used in KPI of sense:

      COUNT({$<Customer= {"=ApplicationDate>=DateTDOpen"},

      Customer = {"=ApplicationDate-DateTDOpen<=LastXDays"} >} Customer)

      query result in qlik sense KPI >>>163


      What am i doing wrong ??