Sum Filtered Data in Tableau

0 votes

I have a database of users and each user record has "User ID" and "Group". After filtering out a chunk of the records, I'd like to sum the number of users within each group. Currently I am doing that with the calculation:

{FIXED[Group]:SUM([Number of Records])}

The problem here is this calculation appears to ignore any records that I've filtered out and just gives a total count per group from all of the unfiltered data.

Is there a quick way to sum the number of visible users in each group after applying a filter?

Mar 13 in Tableau by Anitha
34 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hi Anitha,

Its quite simple, To use a context filter.

Right click on filter and click on add as context, this makes the filter to effect the fixed count just like normal filters.

You can also use CNT() function on group field which shows the count of field to see the effect as per above solution while applying filters.

Hope this helps you.

answered Mar 13 by CHERUKURI
• 13,860 points

Related Questions In Tableau

0 votes
1 answer

Calculation issue: Distinct sum in Tableau

SUM( { FIXED [Brand], [Market]: AVG(Target) } ...READ MORE

answered May 8, 2018 in Tableau by Atul
• 10,200 points
1,541 views
0 votes
1 answer

How to refresh the extracted data source automatically in Tableau Desktop?

Hi AwesomeSauce, This comes up every so often!  Tableau ...READ MORE

answered Aug 13, 2018 in Tableau by Naruto
• 710 points
545 views
0 votes
1 answer
0 votes
1 answer

Sum two columns together in Tableau

Hi Anitha,  You can find sum of two ...READ MORE

answered Mar 18 in Tableau by CHERUKURI
• 13,860 points
32 views
0 votes
1 answer

Calculated filed with if-then

Below is the required code:  IF (NOT ISNULL([test2])) ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,200 points
36 views
0 votes
1 answer

How can I count the aggregate function in Tableau

Create two calculated fields one for 100's ...READ MORE

answered Apr 5, 2018 in Tableau by Atul
• 10,200 points
936 views
0 votes
1 answer

How to calculate profit when cost and revenue are in same column?

You can create the following calculated fields: Profit: SUM(IIF([account_category] ...READ MORE

answered Apr 10, 2018 in Tableau by Atul
• 5,470 points
45 views
0 votes
1 answer

Creating a calculated field with LOD expression

Go ahead and try the following three ...READ MORE

answered Apr 20, 2018 in Tableau by Atul
• 5,470 points
58 views
0 votes
1 answer

In Tableau, How to sum the last 7 days of the value?

It can be achieved easily by creating ...READ MORE

answered Mar 12 in Tableau by CHERUKURI
• 13,860 points
61 views
0 votes
1 answer

How do you group data by percentile in Tableau, ignoring nulls?

Hi Anitha, You can group the column data into ...READ MORE

answered Mar 12 in Tableau by CHERUKURI
• 13,860 points
39 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.