How to filter data based on two conditions in rows in Tableau

user3186707

I have a simple dataset from which I need to filter and show number of users in the form of bar graph, however since the data is structured in such a way and it is a live connection I cannot make changes to the data source.

What I need is, I need to display the numbers users who is part of 1) Worldwide Global access & 2) Worldwide Region access and when it comes to Worldwide Region access, the following columns i.e. Region and Sub region should be "ALL" and if any one of the columns are not ALL then the 2nd condition is not met. I tired adding a filter and when the 1st filter is added then by default 2nd filter will be False and I cannot use the 2nd filter and vice versa.

I have tried it and I couldn't find a solution to this problem.

The result should be only the following user "AAAA" meets the 2 conditions as user has "Worldwide Global access and Worldwide Region access and also Region and Sub Region is "ALL".

Can someone please let me know how to achieve the desired results.

enter image description here

AnilGoyal

Leave the dimension filter as it is, and use the following calculated field (will return boolean values) as your filter.

calculated field 1 say desired filter (set it to TRUE in filters card)

(If [Access level] = 'Worldwide Region access' then [Region] END) = 'ALL'
AND
(If [Access level] = 'Worldwide Region access' then [Sub Region] END) = 'ALL'
AND
{Fixed [User] : SUM(
If [Access level] = 'Worldwide Global access' then 1 else 0 END) } >0

It should work.

enter image description here

enter image description here

enter image description here

Or if you want these as two separate filters, use these by breaking the conditions in two say filter 2

(If [Access level] = 'Worldwide Region access' then [Region] END) = 'ALL'
AND
(If [Access level] = 'Worldwide Region access' then [Sub Region] END) = 'ALL'

AND first one say filter 1

{Fixed [User] : SUM(
If [Access level] = 'Worldwide Global access' then 1 else 0 END) } >0

enter image description here

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Filter rows based on two criteria

How do I filter specific rows in a csv file based on two conditions? (using pandas)

Filter rows based on multiple conditions using dplyr

How to filter rows with multiple conditions

How to subset data based on two conditions

Groupby and filter rows based on multiple conditions in Pandas

Counting Rows in Excel based on optional filter conditions

Delete rows based on two conditions

Count and filter data based on paired data/every two rows?

Pandas: how to select rows based on two conditions in the same column

Filter rows based on certain conditions in pandas dataframe

Filter rows of a dataframe based on certain conditions in pandas

Filter data-frame rows based on conditions Pandas

How to extract rows based on two conditions

Filter array based of two conditions

Filter rows within groups based on multiple conditions

sql: filter rows based on conditions

Filter data based on sum of two rows

Filter grouped rows based on multiple conditions in Pandas

Select rows in a Data Frame where the ID must have two conditions based on two different rows in PySpark

How to use query to filter data based on certain conditions in google sheet

filter rows based on group with multiple conditions in R

Filter pandas dataframe rows based on multiple conditions

How to filter rows with NA based on multiple conditions

Filter and extract rows based on multiple conditions

How to filter rows based on multiple columns satisfying conditions using tidyverse?

How to automate the code to fetch data based on 2 filter conditions in python?

Filter rows from specific columns based on two conditions with dplyr

How to filter a data.table based on an uncertain number of conditions?