4 Replies Latest reply: Jul 7, 2016 6:28 AM by Janani Reddy RSS

    Count using set analysis

    Janani Reddy

      Hi,

      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 ??