
1. Re: Need the tableau formula for Weighted Handling
Sarah Ebreo Nov 28, 2016 11:31 AM (in response to Bilal Raja)Hi Bilal,
Using the original data in the picture you provided I was able to display the desired Weighed Handling values with the formula:
{ FIXED [Shops]: SUM([Sales]) } / { SUM([Sales]) }I've included a sample workbook that illustrates the steps below:
 Connect to the original data
 Create a calculated field "Weighted Handling" with the formula: { FIXED [Shops]: SUM([Sales]) } / { SUM([Sales]) }
 Place Player on Rows and Weighted Handling on Text
This formula uses Level of Detail expressions. More information can be found here:
Introduction to LOD Expressions (Video)
Level of Detail Expressions (Product Help)
Let me know if this solves your question.
Best,
Sarah
weightedhandling.twbx 22.9 KB

2. Re: Need the tableau formula for Weighted Handling
Bilal Raja Nov 29, 2016 5:32 AM (in response to Sarah Ebreo)Dear Sarah,
Thanks a bunch.
That's what i needed. However, i did not get the results after i applied it to the full data set.
Question 1: i am unable to figure out how you get percentage for the Weighted Handling. when i applied the same formula i did not get results in %.
I have attached my workbook. please look in to weighted handling sheet. This data has the waves(periods) and Cities. i have creates a calculated field "WD" with the formula: { FIXED [Shop Code]: SUM([Value])} / {SUM([Value]) }
Please look into it.
Regards,
Bilal

Trended Data V2.twbx 3.8 MB


3. Re: Need the tableau formula for Weighted Handling
Sarah Ebreo Nov 29, 2016 8:30 AM (in response to Bilal Raja)Hi Bilal,
To display the WD values as a percentage you can change the default formatting for the WD field.
 Right click on WD in the Measures pane
 Click Default Properties > Number format...
 Click Percentage > OK
More info can be found here:
Formatting (video)
Format your work (product help)
Sarah

4. Re: Need the tableau formula for Weighted Handling
Bilal Raja Nov 29, 2016 8:48 AM (in response to Sarah Ebreo)Dear Sarah,
Thanks for guiding. Please also look into the issue in the attached file as well.
thanks.

5. Re: Need the tableau formula for Weighted Handling
Sarah Ebreo Nov 29, 2016 9:50 AM (in response to Bilal Raja)Hi Bilal, in the example you originally provided there are only two dimensions, Shop and Player. In this attached file we now have City, Wave, and Manufacturer so the calculation will likely need to be updated. You may need to add or change the Fixed fields in the LOD expression. Can you provide more details about what you are looking for and the expected results for the Weighted Handling worksheet?

6. Re: Need the tableau formula for Weighted Handling
Bilal Raja Nov 30, 2016 1:05 AM (in response to Sarah Ebreo)Dear Sarah,
I have figured out the additional dimensions to be added in the Fixed fields
Below worked for what i needed.
{ FIXED [Shop Code], [Wave], [City1]: SUM([Value])} / {FIXED [Wave], [City1]: SUM([Value]) }
Thanks for your help.
I will bug you in future for more help.
Regards,
BIlal