3 Replies Latest reply: Jul 20, 2016 5:58 PM by Massimo Grossi RSS

    Count the Number of Daily Records while Excluding Certain Values

    Gerry Zapantis



      I am having some trouble with my custom measures in Qlik Sense.  I am trying to count the number of records that were created today while excluding certain status codes. I am trying to exclude Status Codes 13 (deleted record) and 213 (test record), which should then result in a count of  all production records for the current day.  When I estimate the daily number of records, the deleted records and test records do not count towards the total.  I tried using nested IF statements, the Set Analysis Wizard, and a combination of both, all to no avail.


      To limit to the current day...I have used the expression [IF(Date(xDate) LIKE Date(Now(0)),ID)] in the Expression Builder and the set analysis wizard gives me Count({$<StatusCode-={13},StatusCode-={213}>}ID) to remove the two status codes from the set and then count the number of records that remain (ID).


      I know that I can easily use the Data Load Editor to exclude the status codes and then use the expression builder to limit the results to the current day, but I am trying to create a master app that can have separate sheets for production unit records and for test and deleted records.


      Thank you,


      Gerasimos Zapantis