4 Replies Latest reply on May 8, 2018 11:37 AM by Trey Weeks

# Create Index by dividing by Grand Total

I am not sure how to exactly express my problem but I will start by referencing the thread I am trying to replicate: Create index by dividing by grand total

I want to create an index for any given metric (in this attached workbook example, engagement rate, conversion rate, take rate, system availability). The attached thread only uses sales, however I want to accomplish the same thing but by using any metric available in my data source. To calculate the index, I want to do (Metric/Metric Grand Total) * 100 so the index value of the "grand total" will always equal 100.

• ###### 1. Re: Create Index by dividing by Grand Total

HI Trey

Yours are connected to server and we cannot see the viz.

Cold you please extract data before creating twbx.

Thanks,

Shin

• ###### 2. Re: Create Index by dividing by Grand Total

Oh yes apologies for that, here is the updated workbook along with a sample of what I am trying to accomplish.

 Raw Data Airline Airline Airline Airline Airline Airline Airline Airline Airline Airline AAL ACA AMX ASA BAW DAL GLO UAL VIR Grand Total Engagement Rate 18.05% 8.22% 9.07% 30.76% 1.25% 21.76% 14.05% 22.29% 8.05% 19.92% IFC Take Rate 7.76% 2.64% 1.63% 13.45% 10.26% 11.05% 2.06% 4.05% 3.86% 8.73% Sessions 18,152,899 781,757 62,406 5,603,175 38,475 26,501,682 390,576 1,531,509 134,544 53,197,023 Index - What I want to Automate Airline Airline Airline Airline Airline Airline Airline Airline Airline Airline AAL ACA AMX ASA BAW DAL GLO UAL VIR Grand Total Engagement Rate 90.61245 41.26506 45.53213 154.4177 6.2751 109.23695 70.53213 111.8976 40.41165 100 IFC Take Rate 88.888889 30.24055 18.67125 154.0664 117.5258 126.57503 23.59679 46.39175 44.21535 100 Sessions 34.1239 1.46955 0.117311 10.53287 0.072325 49.817979 0.734206 2.878937 0.252916 100
• ###### 3. Re: Create Index by dividing by Grand Total

Hi Trey

Does this help?

LOD

Overview: Level of Detail Expressions

FYI context filter and LOD

Tableau's Order of Operations

Thanks,

Shin

• ###### 4. Re: Create Index by dividing by Grand Total

Shin,

This definitely helps. My new question: is it possible to have the index values recalculated if you were to change any of the Airline filters? For example the current view you are showing only has those 9 Airlines, therefore the index does not equal 100%, is it possible to take into account the airline filters so it always equals 100% no matter what you are comparing? Does right click "Add to context" solve what I am trying to do?

Thanks,

Trey