Generally we use the filters to reduce the number of records present on the report or to show only required data on the report & to improve the performance.
Tableau have the following different kind of filters
• Regular Filters
? Regular Filters – Dimensions
? Regular Filters – Measures
? Regular Filters – Date
• Quick Filters
• Context Filters
=====
Regular Filters - Dimensions:
•
All fields that are filtered show on the Filters shelf.
•
We can apply the Regular flirters either by dragging fields onto Filers shelf or in the view right click then select either hide or exclude.
•
Right click on Field from the row shelf.
=====
Here we can filter the data in 4 different ways
•
General
•
Wildcard
•
Condition
•
Top
The below picture is having the data without applying any filters.
a.
General: select the required data which should only be showed on the report.( Ex: California, Florida, Texas, which is showed in the below picture)
b.
Wildcard: We can filter the data by applying Wildcard. ( Ex: Sates names starts with “N”, which is showed in the below picture)
c.
Condition: We can filter the data by applying condition. ( Ex: States which sales more than 25000, which is showed in the below picture)
d.
Top: We can filter the data by define top n records. ( EX: Top 6 Cities sales wise, which is showed in the below picture)
=====
Regular Filters - Measures: (Quantitative Filters)
We can apply filter on measure fields by applying aggregation filters.
In the following example, we are applying filter on Sales which should more than or equal to 5000.
Before apply the Filter, Tableau Engine automatically defines Min & Max values
Date Filters:
We use this kind of filters to filter the Date Data type kind of Data. By using this kind of filters we can show Required Years, or Months or Quarters Data, ( Jan-2015 or Yr-2015, Q1-2013.......)
Or We can show data for Specific range. (EX: From 1-Jan-2011 to 12-Sep-2013,.........)
EX 1: List the customers who made Transactions in Year - 2011
1) Drag [Region], [Order Date], [Customer Name] fields into Rows shelf.
2) Drag the one of Measure fields from Measures window into Column Shelf.
3) Drag the [Order Date] into Filters shelf, then it will the list , here select Years , then check the box for Year -2011.
Tableau let's filter the Date Data in 2 Different ways.
1) Relative Date Filters.
2) Range Date Filters.
*********************
Relative Date Filters.
Relative date filters are dynamic, here values are changed as system date get changes.(Operating System)
EX: Relative - Current Year
Today Date #09-Jul-2015#
Description:
If you ask this Month Sales Data, It will show you Jul-2015 Data.
If you run the same report in Next month, it will show you Aug-2015 Data.
Means here we are filtering the Data like Current month, it will change as per the Day you run the Report.
Tableau is offering the following different kind of Relative Date Filters.
Years, Quarter, Months,........
EX: Today Date #09-Jul-2015#
Show me the Current Year Sales.
Today is #09-Jul-2015#, so it will show 2015 Data (including Future data also if database contains)
1) Drag [Region], [Order Date], [Customer Name] fields into Rows shelf.
2) Drag the one of Measure fields from Measures window into Column Shelf.
3) Drag the [Order Date] into Filters shelf, then it will the list that contains Relative & Range Filters, here select Relative then click on Years, Then Click on "This Year" radio button.
4) As of now this report shows 2015 Data.
5) If you run the same report after 1 year, it will show 2016 Data. ( DB should have 2016 data rather than it will show empty report).
EX: I want to show current Month, Quarter, Last Quarter this Year, Last month this Year, .........
I want to see last 3 Years of data on the Report.
*********************
Range Date Filters.
This kind of filters allow us to define the Static range dates.
And here we can't change date data, it means it is fixed Date filters.
EX: Today we have created a report for year - 2012, if you run the same report in net year, it will show YR-2011 data only, now we can say these filter values are fixed. ( Dont consider Parameter, Quick Filters in this scenario.)
EX:
1) Drag [Region], [Order Date], [Customer Name] fields into Rows shelf.
2) Drag the one of Measure fields from Measures window into Column Shelf.
3) Drag the [Order Date] into Filters shelf, then it will the list that contains Range Filters, here select Range then Define Starting & Ending Dates.
4) As of now this report shows 2015 Data.
5) If you run the same report after 1 year, it will show 2016 Data. ( DB should have 2016 data rather than it will show empty report).
*********************
Tableau offers filtering the data in different ways also, we can call these are static filters.
1) Year wise, Month wise, Quarter wise, Week wise,............
2) Starting Date to Till end of the Date as per data in the DB.
3) Up to certain Ending Date from starting Date.
*********************
Removing Nulls Data from the Report.
My data have nulls in Date Columns for Some Dates, i want to remove from the Report.
EX:
1) Drag [Region], [Order Date], [Customer Name] fields into Rows shelf.
2) Drag the one of Measure fields from Measures window into Column Shelf.
3) Drag the [Order Date] into Filters shelf, then it will show the list that contains Range Filters, here select Relative then click on "Special", then click on "Non-null dates" option.
4) Now Report don't have the null Dates.