15 Replies Latest reply: Nov 3, 2017 1:08 PM by Jeremy Lee RSS

    Set analysis with total

    Jeremy Lee

      Hello everyone,

       

      I have an expression:

      Count(Total {<AEID= ,acc_TradeDate = {">=$(=Date(Max( StartWorkingDate),'YYYY-MM-DD'))"}>} Distinct acc_TradeDate)

      which used on a simple straight table with Dimension: AEID and StartWorkingDate.

      This expression is used to count all the TradeDate from employee's start working date.

      The problem is when i use the expression above, it shows the same value for all AEID with differebt StartWorkingDate.

      Can you help me with this?

       

      Here the model im working on:

      qlik.png

       

      Message was edited by: Jeremy Lee

      I added SampleData for more detail. In the data we have 2 AEIDs. Assume that user is selecting TradeDate from 1 to 31-Oct to view the data in Oct 2017. (Date format is mm/dd/yyyy)

      + AE_2: this employee starts to work on 11/15/2016, so he has 22 acc_TradeDate for this month (known as working date in month)

      + AE_1: this emplyee starts to work on 10/09/2017 (this month), he started to have the first acc_TradeDate in 19/10/2017, so he just has 9 acc_TradeDate in the data.

      But the business requirements is AE_2 should be counted 22 working date, and AE_1 should be 17 (count from the Start working date 10/09/2017).