
1. Re: Creating a share measure vs a fixed line in my data set
Mavis Liu Jun 13, 2018 4:13 AM (in response to Naila Ahmed)Hi Naila,
Please use this calculation:
SUM([Value Sales])/min(
{ FIXED : sum(if ISNULL([Company]) then [Value Sales] end)})
Then format this field as a percentage, results will be this:
Thanks, I've attached the workbook so that you can take a look.
Mavis

Share_v10.2.twbx 11.4 KB


2. Re: Creating a share measure vs a fixed line in my data set
Jim Dehner Jun 13, 2018 4:43 AM (in response to Naila Ahmed)Good morning
please see the attached approach
it uses the following formula
and returns this
Jim
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.

Share_v10.2.twbx 12.8 KB


3. Re: Creating a share measure vs a fixed line in my data set
Naila Ahmed Jun 13, 2018 5:14 AM (in response to Mavis Liu)Hi Mavis Liu
Thank you for your very prompt reply on this
I have tried to use this suggested formula for my complete workbook and it does not work, I think this is because I have a number of other attributes like category, channel and time period. I have attached an updated version of the workbook which takes these into account, are you able to incorporate this into your calculation to get it to work?
Thank you again!

Share.twbx 12.4 KB


4. Re: Creating a share measure vs a fixed line in my data set
Naila Ahmed Jun 13, 2018 5:16 AM (in response to Jim Dehner)Hi Jim Dehner,
Thank you for your reply  I really appropriate your suggestions.
As with my reply to Mavis, is it possible to get your calculation to work with the additions I have added to my second file?
Thank you!

5. Re: Creating a share measure vs a fixed line in my data set
Mavis Liu Jun 13, 2018 5:26 AM (in response to Naila Ahmed)Hi Naila Ahmed,
Ah you have filters, in that case please try this:
SUM([Value Sales])/min(
{ EXCLUDE [Company] : sum(if ISNULL([Company]) then [Value Sales] end)})
I've added it into your workbook and it looks like it works!
:
Originally I was using a fixed LOD calculation which comes BEFORE any filters are applied. Now I've used an exclude LOD calculation which takes the filters into account
More information on LODs can be found here: Overview: Level of Detail Expressions and Top 15 Tableau LOD Expressions (Practical Examples)
Thanks, I've reattached the workbook so that you can see how it works.
Mavis

Share (2)_v10.2.twbx 14.1 KB


6. Re: Creating a share measure vs a fixed line in my data set
Jim Dehner Jun 13, 2018 5:32 AM (in response to Naila Ahmed)Good morning again
I see you added dimensions to the vis
the way fixed works it will use the dimension to create permutations of the all the combinations
if you take the formula I sent fits and add the dimension in your viz
it will produce this
Jim
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.

Share (1)_v10.2.twbx 12.6 KB


7. Re: Creating a share measure vs a fixed line in my data set
Naila Ahmed Jun 13, 2018 8:34 AM (in response to Jim Dehner) 
8. Re: Creating a share measure vs a fixed line in my data set
Jim Dehner Jun 13, 2018 8:38 AM (in response to Naila Ahmed)Thanks
Glad to help out
Jim