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
8,423 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.

Hope this helps you.

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

answered Mar 13, 2019 by Cherukuri
• 33,010 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
7,507 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
3,700 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,010 points
19,817 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,230 points
832 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,230 points
4,504 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 sdfg
• 5,550 points
488 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 sdfg
• 5,550 points
570 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,010 points
12,804 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,010 points
1,946 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP