2 Replies Latest reply on Mar 2, 2016 3:25 PM by Joe Lischynski

# How to calc a percentage between filtered and unfiltered totals ?

I have this report that applies the given required filters to an input file to properly calc the 'Opp Trade Check' field shown below.  But I need to then calc the percentage of this result compared to the total UNFILTERED Block count (by each Sector and Trader) from the input file.  The problem in this first screen shot is that both the 'Number of BUYs' and 'Number of Blocks' are also impacted by the filtering logic.

So I then created a 2nd sheet where I removed all the filtering logic to get the real unfiltered Totals:

I can then bring these two sheets together on a dashboard, but the problem is that I can't figure out how to calc a percentage from the 'Opp Trade Check' from the 1st sheet to the real unfiltered 'Number of Blocks' from the 2nd sheet.

Is there a way to perform this kind of calc?

Or is there a better way to restructure this logic where I can get both the Filtered and Unfiltered results on the same sheet to then perform the calc easier?

• ###### 1. Re: How to calc a percentage between filtered and unfiltered totals ?

Check out this Tableau knowledge base post on Top 15 LOD Expressions Top 15 LOD Expressions | Tableau Software

Section 4. is called "Percent of Total" and it describes a way to do % of Total calculations using LOD calculations that are not affected by filtering. It has a step-by-step example that should help you with your current workbook.

If you took your current filtered version & added an LOD calculation to the same worksheet, you would be able to see side-by-side percentages (filtered & global).

-Steve

1 of 1 people found this helpful
• ###### 2. Re: How to calc a percentage between filtered and unfiltered totals ?

Thanks for the quick response!

I briefly looked at LOD expressions but was not using the exact syntax required for my specific issue, so I had moved on from it too quickly.  Your link containing the forwarding link to the syntax options helped completely.  I needed to use the FIXED option.  Perfect!