19. How to Apply Filters on Numeric and Categorical variables in Tableau

Опубликовано: 05 Октябрь 2024
на канале: Learn data analytics with us
343
0

hello guys my name is khan and in today's video we'll be discussing filters in tableau and for this video i will be using again the u.s census data set so i will quickly go through the data sets especially if you guys haven't watched my previous videos so this is a kind of a demographic data about us we have only considering usa country in this data and in each of this data is representing each state of usa we have about 50 observations and then we have short abbreviation of state we divided the data into four regions then we have different statistics about the population population urban debt marriage and divorce numbers in u.s census again it's a hypothetical data it's have nothing to do with reality i have constructed this data so that i able to use that data for my video so in order to work on tableau the first thing we will need to import this data into tableau so i will quickly go to tableau as i have mentioned many times before that tableau works in three steps first you need to import the data then you create your visualization and in the last third step you shared your visualization with the audience as i have shown you guys that the data is in the actual format so i will use this option and type the filter this is the data set that i have just shown you guys i will open it up

that I got imported successfully so here we will start working on our sheet one so in this video

so we will apply filters on both categorical variable and based on numeric variable so the first thing we will do is start our filter based on the categorical variable so first i will just create a graph for you guys so it's country and then i will select the state so you can see that we have this graph so in order to make it more interesting let's add the size so in this graph you can see the size of the marks is varying based on the size of the population uh within the country so now let's see if we start implementing the filters you can see that there is a space for the filters suppose if i want to filter my data based on this categorical variable which is region so let's if i drag it here you can see that there is a there are four tabs we will discuss these tabs one by one so the first currently we are in the general tab so suppose i will say do use all these data so suppose if you select this option sorry uh now if i opt so i want that show fill only show those options which that data which got update which i have opted here so let's say i have not selected the west region so let's see like okay you can see from this graph if i zoom out the west region states have been ignored we are just seeing the three regions that we have selected and in order to in order to avoid any confusion i will just rename this sheet as the general

filter so this filter we have applied is based on the general filter let's do a add another sheet and so here i will use a plot the same graph state and then the size of the population is here so now again i will apply filter on the region variable but this time i have already shown you guys that how you can use this general option but this time i will show how you can use wildcard option so but before going to wildcard what i will do here is that instead of region this time i will like to apply filter based on the state so let's see if i apply this interstate all the states are here but i will be using this tab so the in the wildcard becomes mostly useful when there is a long list and instead of going one by one opting it or opting out through general tab it's better to use wildcard so suppose if you want that uh avoid all those states which starts with pause a so and we start applied here so you can see that it have removed all those states which don't start with the a so if i go back hit my filter you can see here in the wild card i am saying starts with and here you can use the option exclude so exclude those which are starting with a so now if i do apply you can see on those states alaska is not now not showing us a it's not showing alaska to us now here because we are saying exclude those states which are starting with the a so in so now suppose if you change your mind you can easily clear filter so now there is no filter again all the data is presented here and now suppose if i again drag the region variable here and again if i you want to see the wildcard option so suppose if i want to say if it contains south only shows dates again the wildcard option the match value is a case sensitive so so probably if i write down south it will not filter anything so apply okay so here but you can see that tableau is is smart enough it's realized that it's uh it's showing us the southern region data points here after data filtering but it's better that you use the uh you write down the south with a capital letter because sometimes that tableau will not recognize it uh in the same way if you can also write down like north if anything starts.


#how #apply filter #numeric #categorical #variables #tableau