4 Replies Latest reply on Jul 21, 2017 12:02 AM by Prayson Wilfred Daniel

    Counting the distinct members of a set based on a parameter value over time

    Isha Garg

      Hi All

       

      I am relatively new to Tableau. I couldn't find a similar question anywhere in any forums. If it is duplicate, please direct me to the discussion.


      Problem:
      So, I have a set of users with the number of products they bought every month. Each user has a unique ID.
      My requirement is to count the number of users who bought atleast 100(should be configurable) product units each month.

      Approach:
      1. I created a parameter - N which will be configured by the user with the number of product units.
      2. Next I created a set of user_id with the condition: sum(product units)>= N

      3. I moved Month to the column shelf and countd(user_id) to the row shelf.

      4. I also moved the set to the filter shelf to include only 'In' values.

       

      Now, the problem is the count is reflecting the number of users for the entire time duration in my data set and not per month.

      I tried creating a calculated field using the set, but the results were not correct with that as well.

       

      Can you please help me solve this?

      I am using Tableau Desktop 10.2 version.

       

      Regards

      Isha Garg