1 Reply Latest reply on Aug 24, 2017 9:30 AM by Shruti Jain

    Dynamic dimension based on a calculation

    benjamin drouin

      Hi all,

       

      I'm quite new with Tableau and I'm currently facing an "issue".

      I want to display information regarding a dimension calculated dynamically by users.

       

      Here a sample datasource :

       

         

      DateCustomerOrder Number
      01/02/2017A1234
      01/02/2017B1235
      02/02/2017A1236
      02/02/2017C1237

       

       

      I made calculated field :

      * Group : if ([Nb distinct Order ] =1 ) then 'Buyers * 1' ELSEIF ([Nb distinct Order ] =2 ) THEN 'Buyers * 2' else 'N/A' END

      * Nb distinct Order  : COUNTD([Order Number])

      * Nb distinct Customer : COUNTD([Customer])

       

      With Date as a filter :

       

      --> For 01/02/2017

      I get :

      --> For  01/02/2017 until 02/02/2017

      I get :

      The result is not perfect but it works !

       

       

      If I want now to change this chart by a Pie Chart I get :

      Actually, Colors are good but as I have customer in details, figures showed on the chart don't match.

      It  should be 33.33 % and 66.66 % ?!

       

      Thanks for your help.