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, 2019 in Tableau by Anitha
11,223 views

1 answer to this question.

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. 

Learn how to Sum two columns together in Tableau

Hope this helps you.

For an in-depth explanation check out Tableau Training Course details.

answered Mar 13, 2019 by Cherukuri
• 33,030 points

Related Questions In Tableau

0 votes
2 answers

Calculation issue: Distinct sum in Tableau

I feel the easiest way is to ...READ MORE

answered Aug 26, 2020 in Tableau by Dhiraj Kumar Sahu
9,623 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 14, 2018 in Tableau by Naruto
• 710 points
4,686 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, 2019 in Tableau by Cherukuri
• 33,030 points
29,825 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,240 points
1,621 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 6, 2018 in Tableau by Atul
• 10,240 points
5,681 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 ffdfd
• 5,550 points
1,215 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 ffdfd
• 5,550 points
1,195 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, 2019 in Tableau by Cherukuri
• 33,030 points
17,211 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, 2019 in Tableau by Cherukuri
• 33,030 points
3,100 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP