3 Replies Latest reply on Jan 9, 2017 1:01 PM by Jim Dehner

# Creating a calculated field based on filtered measures

Hello,

I am trying to create a calculated field and am running into issues. I am trying to figure out what one measure (that is filtered to only see days >30) represents of the whole (i.e. no filter on days).  Is there a way that I can do this? I have referenced a few other articles that said to create the table in two different charts and create the calculation off of that, but it is not working for me.  Any help is much appreciated!!

Example:

Work Orders with Days >30                       Total Work Orders

Company A                         50                                                       100

Company B                         100                                                      400

(*Currently the above calcs are on two seperate sheets as I cannot figure out how to filter on specific calculations, only on the sheet as a whole)

• ###### 1. Re: Creating a calculated field based on filtered measures

Hi Amie

Have you tried using an LOD calculation - attached is an example in Tableau 10.1 - it is based on a calculated field to determine the Fixed total for the period then calculating a %

Let me know if it works for you

Jim

1 of 1 people found this helpful
• ###### 2. Re: Creating a calculated field based on filtered measures

For this to work, does my raw file have to already have the data split (into how many have <30 and total)?

My struggle besides the calc itself is filtering for just the one measure and not the sheet as a whole - meaning, when I apply the filter to only see work orders > 30 days, it filters the entire sheet.  In order for me to achieve my desired calc, I need only the one field to be filtered so that I can take that filtered field and divide by the total work order count. I am not sure if there is an easier way to do this or not.

• ###### 3. Re: Creating a calculated field based on filtered measures

It would need a file that had an individual record for each work order.

Do you have even an excel file that you could share? If so I will take a look at it

Jim