7 Replies Latest reply: Dec 10, 2016 10:24 PM by Shubham Singh RSS

    How to add conditionally calculated count of values

    Anton Vershinin

      Hi all,

      There is an issue I'm fighting with in Qlik Sense but still don't get a solution, maybe you could help, community.

       

      I have a table consisted of user_ids and around 30 other columns. The thing is that I want to assign an ascending count for unique users when they appear again and again.

      Let me give an example (of  what I have):

      User_ID

      Transaction_Id
      User_1231
      012484129412

      safjorw29

      3
      nick_19834
      User_123

      5

      927417461246
      safjorw297

       

      And this is what I want to get:

       

      User_ID

      Transaction_IdUsers_Lifetime_Transaction_Count
      User_12311
      0124841294121

      safjorw29

      31
      nick_198341
      User_123

      5

      2
      9274174612461
      safjorw2972

       

      As you see, 2 users appear twice in the example and the required field returns 2 for them, that should also work for any number of purchases by the same customer.

       

      I hope I managed to explain my question.

      Please help, I would really appreciate any ideas.

      Thank you in advance!