As Tableau users, we are always looking for ways to improve our views and dashboards. Whether we are talking about using features or improving the overall visual experience, we are always looking for new ways to easily navigate and explore our data. To design an interactive experience when the end user is looking for valuable information from an analysis, Tableau provides many features. In today’s post we will discuss how we can change date level using a parameter.
Probably one of the most used dimensions in a Tableau analysis refers to a date or a time period. Regardless of the information we want to analyze, it is always correlated with a certain period. Otherwise, how could we observe the evolution over time of our results, certain behaviors, or patterns? We chose to address this topic today, regarding how to change date level using a parameter, because it is a great method that gives more control to end users. Finally, it helps them navigate easier and have an interactive experience when exploring data.
Before watching the video below and following all the steps you need to go through to change date level more easily, we want to tell you why we recommend this option. First, in any sales analysis, for example, time period plays an essential role. We cannot analyze sales or profit values without referring to a certain period. And even if we do this, one of our goals is to follow our organization evolution and to better understand the future actions that should be taken.
Thus, we need a dynamic method by which we can change date level. From years to months, from months to weeks or from weeks to days. We need a quick method that allows us to change date level depending on the level of data we want to analyze. The ability to create a parameter in Tableau that allows us to change date level is one of the most dynamic options to compare performance at level of weeks, days, months, etc. Second, it offers more flexibility to end user in terms of date granularity and the time on which it will explore his data.
Last but not least, changing date level using a parameter also offers a more user-friendly experience, being a quick way to change data and information we need. In the video below you will see how you can add a parameter in Tableau to change date level.
→ In Tableau Desktop, connect to EU Superstore sample provided by Tableau.
→ Create a new Parameter having the date type String
→ Select List and add values Day, Month, Year
→Create a new Calculated Field and write the following formula
CASE [Date level]
when ‘Day’ then DATETRUNC(‘day’,[Order Date])
when ‘Month’ then DATETRUNC(‘month’,[Order Date])
when ‘Year’ then DATETRUNC(‘year’,[Order Date])
end
→ Bring the new field to columns, right click on it and select Exact Date
→ Bring Category and Sales to rows
→ Right click on the newly created parameter and select Show Parameter
→ Select the date level desired
By Andrei Stan
In Talend Cloud Management Console (TMC), you can create executable tasks and execution plans, which can be run directly in the Cloud or with a Remote Engine. You need to create an execution plan to allow automated runs in TMC, […]
In this Skillpill, you will learn how to use Tableau Prep to organize, clean, and transform your data to be further used in analysis and visualizations. Data comes in all shapes and sizes, especially of different quality, which sometimes proves […]
On April 18 we organized a private event btProvider & Vertica by OpenText titled “AI and Analytics”.
It was a private event dedicated to Data enthusiasts eager to explore the innovations of Analytics and Artificial Intelligence.