Explore Courses Blog Tutorials Interview Questions
0 votes
in BI by (17.6k points)

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?

1 Answer

0 votes
by (47.2k points)
edited by

Hi Vaibhav,

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.

Get certified in this field to make your career. Enroll in Tableau Certification now.

Browse Categories