5 Replies Latest reply on Jul 26, 2018 5:26 AM by Okechukwu Ossai

# some one please help me how this formula works SUM({FIXED [Sub-Category]:SUM([Sales])}) / SUM({(SUM([Sales]))})

if i delete curley braces after sum in second part i ma getting errorwhy like that and why we will use curley braces

• ###### 1. Re: some one please help me how this formula works SUM({FIXED [Sub-Category]:SUM([Sales])}) / SUM({(SUM([Sales]))})

Anjali,

Curly braces we use to do LOD calculations. With LOD calculations  you can aggregate the measures at the level other than your viz. Check the below link :

https://onlinehelp.tableau.com/current/pro/desktop/en-us/calculations_calculatedfields_lod_overview.html

Let me know if you need more help in understanding.

• ###### 2. Re: some one please help me how this formula works SUM({FIXED [Sub-Category]:SUM([Sales])}) / SUM({(SUM([Sales]))})

If by chance you are from SQL background you can refer to the below document:

https://community.tableau.com/docs/DOC-18211

• ###### 3. Re: some one please help me how this formula works SUM({FIXED [Sub-Category]:SUM([Sales])}) / SUM({(SUM([Sales]))})

Hello Anjali,

this calculated field is set the dimension from your view to Sub-Category to use in the calculation, making the SUM(Sales) of him and after that make the Div calculation to all the sum(sales) from Sub-Category in another dimensions.

Are you using more than one dimension in your view?

Can you share the twbx or a image from the dashboard?

• ###### 4. Re: some one please help me how this formula works SUM({FIXED [Sub-Category]:SUM([Sales])}) / SUM({(SUM([Sales]))})

ya but fixed lod expression was 1st part and i am getting error on second pat if i remove the curley braces there i sno lod keyword in second part

• ###### 5. Re: some one please help me how this formula works SUM({FIXED [Sub-Category]:SUM([Sales])}) / SUM({(SUM([Sales]))})

Hi Anjali,

Although there is no explicit keyword, the second part is also an LOD . It is a short hand form of saying, 'fix the calculation to the entire dataset'.

{SUM([Sales])} is exactly the same as {FIXED: SUM([Sales])}

What the formula does is to fix the calculation to the entire dataset. In this case, it will sum and return the total of all available sales data.

So, your formula can be rewritten as below. Both will give the same result.

SUM({FIXED [Sub-Category]:SUM([Sales])}) / SUM({FIXED: SUM([Sales])})

Hope this helps.

Ossai