How to Filter Multiple Date Fields at Once in Tableau

preview_player
Показать описание

Connect with us:

Description:
Does your data set have multiple date fields? For instance, maybe you have both an "Order Date" and a "Delivery Date". Or maybe you have both a "Hire Date" and a "Termination Date".

Sometimes, you need to filter on both date fields at once to answer questions like, "How many people were hired and how many people were terminated in the Marketing Department this year?"

The challenge is, if you filter a worksheet on Year of Hire Date = 2023, you can't see information about people who were hired in 2022 and earlier but terminated in 2023. If you filter the worksheet on Year of Termination Date = 2023, you can see all the details for who was terminated in 2023, but you wont see info for people that were hired and not terminated in 2023.

In this tutorial, we’re going to build a parameter to adjust two date-based filters simultaneously!

All we need to do to make this work is to:
•Set up a parameter that contains our date range options
•Display the parameter
•Create calculated fields that return values when the parameter criteria is TRUE
•Place these calculated fields in the view!

For a full walkthrough, check out this week’s video!

Resources:

Chapters:
0:00 Intro to Example
3:28 Building Solution
Рекомендации по теме
Комментарии
Автор

Thanks for the video. Can you explain the same with Year-Month (latest 2 years = 24 months) in the place of Job Class Description ?
Is that possible?

srikanth
Автор

Great video Ollie! Just wondering how we can do this with a month and year parameter as opposed to just year?

jesusvilla
Автор

Hi Ollie, thank you for the awesome explanation, you make it easy to digest. I do have a question, what about if instead of using the parameter to display a singular year, we want it to display a range of years i.e. 2018-2023?

Eri.p
Автор

This was a great video! How can I show hires and terminations over the last 12 months when both hires and terms have separate date fields like above and no scope of pivoting or scaffolding?

dhitukli
Автор

Drop your parameter into the sheet title to make the year dynamic

moxie
Автор

Can I use that parameters to "apply to worksheets"? What if I need a date filter as a single filter on the worksheet of actual % of gender and age. How to do that?

researchdevelopmentdepartm
Автор

how to show from different source? or how to show table like this
Hire Termination
2020
2021
2022
2023

LancarjayaLaughtale
Автор

Hi, i am looking to add the multiple year parameters, how can we do it?

madhulikasuman
Автор

Hi Ollie, how can filter dates with year and month?

mjzjuxc