7 Replies Latest reply on Dec 13, 2013 6:48 AM by Matt Lutton

    Tableau GROUP BY issue without SQL

    Alexandre DAVID



      I am trying to reuse an existing query that provides information like this :


      User A - Product A

      User A - Product B

      User B - Product A

      ... etc.


      And turn it into a bar chart that would display data as follows :

      - x axis : Number of products purchased

      - y axis : Number of users that bought such number of products (which I would turn into % of all users later but that part is not an issue)


      Basically, if I had to use SQL, I would simply COUNT (DISTINCT ProductID) as Number_of_Products... GROUP BY UserID.

      Then COUNT(DISTINCT UserID)... GROUP BY Number_of_Products


      At the moment, I cannot find a trick in tableau to avoid making an additional query.

      I'd say the problem would be that I am turning a dimension (ProductID) into a measure (Number_of_Products)... then back into a dimension.


      Can you help me with this ?