3 Replies Latest reply on Dec 6, 2016 1:19 AM by Ashish Chaudhari

    Counting and Summing of logic

    nagesh aradhya

      Hi friends ,

       

      I am doing project on how to calculate Healthy yield calculation for the products ,during that I have stuck with calculation of counting and Summing of logic.

       

      Seeking your suggestion find out the same

       

      Calculation:

       

      No of products produced : Count of products produced

      No of products on target  :  Sum of sites on target

      Overall target :  No of products produced/ No. of sites on target

          

      Date Time
      ProductsYieldJulyAugustSeptemberComments
      Product10.983695652 111--> On target, 0-- below target
      Product20.956310680101
      Product30.962264151101
      No of products produced233Count of products produced
      No of products on target213Sum of sites on target
      Overall Yield100.00%33.3%100.00%
        • 1. Re: Counting and Summing of logic
          Patrick A Van Der Hyde

          Hello Nagesh,

           

          Could you send a .twbx file rater than a .twb.  The data source in the .twb references fields and a 'sheet 1' but the excel file has two different sheets with different names.  Please send the .twbx and this will be resolved. 

           

          In addition, please share the version of Tableau that is in use. 

           

          Thank you

           

          Patrick

          • 2. Re: Counting and Summing of logic
            nagesh aradhya

            Hi Patrick ,

             

            Sorry ,here attached the .twbx file.

             

            Version:Tableau 10.1

             

            Regards/

            Nagesh

            • 3. Re: Counting and Summing of logic
              Ashish Chaudhari

              Hi Nagesh,

               

              I am not sure if that can be achieved in the one view but I can provide you little bit of support on the calculation part. Please refer to the below calculation where I have got the output for the "Number of Products on Target (Sites actually)". below screenshot is just for the validation purpose.

              After removing the Site and products from the view please find the final output that you get.

              Please make a not that we are getting the sites on target. So if you refer to the above image you will see that By product for SEPT 2016 we are getting 1 for the Swedan. After removing Site and products we will be getting 1 as the output and not as 3 since Swedan as the site has good yield overall.

               

              Calculation : - SUM({ INCLUDE [Site]: (IF [Logic]="1" THEN COUNTD([Site]) END) })

               

              For the Number of Products I am bit confused since your August shows the count 1 for the Product 1 and for others its 0 still you have written that Number of products produced as 3.

               

              I have simply taken the Grand total of it to get the month-wise production of products. Let me know if its right or not.

              This is all as per your data in the workbook. I will calculate overall yield once you confirm the above output.

               

              Thanks and Regards,

              Ashish Chaudhari