1 Reply Latest reply on May 19, 2017 9:53 AM by Patrick A Van Der Hyde

    How to create Calculation: Category (Always =1 ), % Sub-category (Restart by category). *** (Can use hierarchy)

    Trần Ngọc Sơn

      I want to distribution square m2 by category (Input by Parameter, detail Category). Ex: each category have a number Square, it's fix by category. After, I try distribute square by % contribution Sales detail sub-category in each category.

       

       

      I can create 3 sheet to do it. But, it's the bad solution, it's take more space in dashboard.

       

       

      So, I find a method to create calculation category always percent = 1; when i drill down hierarchy sub-category and manufacturer, calculation can distribute by sub-category and manufacturer.

       

       

      I attach a workbook bellow, it's my way to do. Summary, I need combine 3 sheet in workbook to 1 Sheet (By hierarchy when you drill down).

       

       

      Thank you for your help.

        • 1. Re: How to create Calculation: Category (Always =1 ), % Sub-category (Restart by category). *** (Can use hierarchy)
          Patrick A Van Der Hyde

          Hello Tran,

           

          You could do these calculations with LOD calcs instead and that would make it much easier to get the values on a single view.  For instance the Manufacturer level calc is:

          {Fixed [Manufacturer],[Sub-Category]:sum([Sales])}/{Fixed [Category]:Sum(Sales)}

           

          I'm not sure how you want the view on a single pane to look but the values can be computed with LOD calcs a lot easier than Table calcs and you will still be able to move the views around with different Dimensions added/removed and not need to worry about partitions. 

           

          If you are not familiar with LOD calcs, I recommend reviewing the online training www.tableau.com/learn/training 

           

          Patrick

          1 of 1 people found this helpful