Course Overview
- Instructor: Bar Zini, Big Data lead at Mercedes-Benz with 10+ years experience
- Duration: 21 hours covering Tableau from beginner to advanced
- Unique approach: 250+ animated sketch notes simplifying complex Tableau concepts
- Includes free materials: datasets, Tableau sheets for concepts, calculations, visuals, and downloadable sketch notes
Key Learning Modules
Introduction to Tableau and Data Concepts
- Business intelligence, data visualization importance
- Big Data, IoT, data science fundamentals
- Tableau product suite overview: Desktop, Public, Prep, Server, Cloud, Reader, Mobile
- Tableau architecture: live vs extract connections, file types, server components
Environment Setup
- Download and install Tableau Public
- Create free Tableau Public account
- Use provided datasets (EU and non-EU versions) for practice
Data Modeling in Tableau
- Star schema fundamentals: fact and dimension tables
- Tableau data modeling layers: physical (joins, unions) and logical (relationships)
- Methods to combine tables: joins (inner, left, right, full), unions, relationships, data blending
- Practical creation of two data sources (small and big datasets)
Tableau Metadata
- Data types: number (integer, decimal), string, date, boolean
- Roles: dimensions vs measures
- Discrete vs continuous fields and their impact on filters and views
- Geographic and image roles
- Renaming conventions and techniques
- Aliases for data cleaning and abbreviation
Organizing Data
- Hierarchies: creating and navigating drill up/down
- Grouping dimension members: groups, clusters, sets, bins
- Practical grouping and clustering examples
Filtering Data
- Types of filters: extract, data source, context, dimension, measure, table calculation
- Filter order and impact on performance
- Sharing filters across worksheets
- Quick filter customization and best practices
- Sorting data: user controls and developer options
Tableau Parameters
- Creating dynamic, interactive dashboards
- Use cases: calculations, reference lines, filters, swapping dimensions/measures, dynamic titles, bins
- Parameter actions for user-driven interactivity
Tableau Actions
- Types: URL navigation, sheet navigation, filter, highlight, set value, parameter value
- Creating and configuring actions in worksheets and dashboards
- Best practices for triggers and user experience
Tableau Calculations
- Four types: row-level, aggregate, LOD expressions, table calculations
- 60+ functions including number, string, date, null, logical
- Nested calculations and syntax overview
- Practical examples for each calculation type
Chart Types (63+)
- Bar charts (row, column, side-by-side, stacked, 100% stacked, lollipop, bar-in-bar)
- Line charts (basic, multiple, dual axis, cumulative, difference, rank, sparkline, slobby)
- Pie and donut charts
- Tree maps and heat maps
- Bubble and stacked bubble charts
- Maps (filled, symbol, night vision)
- Histograms (single and dual measure)
- Calendar heat maps
- Waterfall, part-to-whole, correlation, ranking, distribution, spatial, flow charts
Dashboard Design
- Planning with sketches and container structures
- Vertical and horizontal containers, floating vs tiled
- Layout management and item hierarchy
- Adding content, spacing, formatting, coloring
- Filters and interactivity
- Navigation buttons and icons
- Final touches and testing
Real-World Tableau Project
- From user requirements to mockups
- Data source preparation and modeling
- Building charts and KPIs
- Dashboard assembly and formatting
- Adding filters, interactivity, and navigation
- Delivering professional dashboards
Conclusion
- Mastery of Tableau fundamentals and advanced features
- Ability to implement real-life BI projects
- Strong foundation for career growth in data visualization and analytics
This course is designed for beginners and experienced Tableau users, covering essential skills transferable to other BI tools like Power BI and Qlik. It emphasizes practical application, best practices, and performance optimization for effective data storytelling and decision-making.
For those interested in expanding their data visualization skills further, consider exploring Understanding the Weaknesses of Data Science and the Basics of Data Visualization for foundational insights. Additionally, if you're looking to enhance your skills in data preparation, check out the Comprehensive Guide to HR Data Preparation in Analytics. For a deeper dive into data analytics frameworks, Mastering HR Analytics: A Comprehensive Guide to Data Science Frameworks is an excellent resource.
hello and welcome to this very unique course to master Tableau my name is bar zini and I'm currently leading Big Data
projects at mercedesbenz with over a decade of experience in Big Data data visualizations and business intelligence
projects and I'm very excited to be your instructor for this course in this 21-hour course I'm going to be sharing
everything that I know about one of the most in demand skill in data science and data visualizations Tableau so that by
the end of the course you're going to be able to create amazing dashboard and visualizations in Tableau like I do in
the real projects and I designed this course to take you from Zero to Hero so if you are a beginner don't worry about
it I'm going to explain everything from the scratch step by step so that means this course assumes that you don't have
any skills in data visualizations and as well all the skills that you going to learn in this Tableau course like data
moding and so on could be used in any other tools like powerbi and click and now of course you might ask yourself
what makes this Tableau course different and unique from all other online courses this is the only course that breaks down
the complex concepts of Tableau into animated visuals because visuals are very powerful to make complex Concepts
easy to understand and to follow and in this Tableau course we're going to present over 250 animated sketch notes
of Tableau Concepts understanding the concepts and how Tableau work can make you a professional and expert in data
visualizations and in Tableau and in this course I'm going to provide you with tons of free materials like for
example I have prepared three different data sources for this course that we going to use in all our tasks and
examples through the course and as well I'm going to provide you with three Tableau sheet sheets one sheet sheet for
all Tableau Concepts another one for all Tableau calculations and we have one more sheet sheet for all the visuals to
help you choosing the right charts so having those three sheet sheets you don't have to memorize everything you
have a quick reference and access to Tableau Concepts and as well you have access to all Tableau files and
dashboards that is created during the course and as well all the sketch notes of each section are available to you to
download so you can use it later as a reference so now let's have a sneak peek about the Tableau course we will start
with the basics what is business intelligence data visualizations what is Tableau and then you're going to learn
the Tableau product Suites and after that we're going to do Deep dive into different Tableau Concepts like the
Tableau architecture Dimensions measures discret and continuous data after that we're going to Deep dive in tblo
calculations and fun functions you're going to learn more than 60 different functions in Tableau to manipulate your
data and after that we're going to go and cover more than 63 different types of charts in Tableau and then at the end
we're going to go and Implement Tableau projects similar to the one that I do in real life projects so now the question
is who is this course for if you are someone that has never built any data visualizations using tools like Tableau
or power pii I will be with you in this course in each step starting from the fundamentals and we're going to end up
having the advanced topics and this course is as well for you if you are already a tableau developer so I would
suggest for you that to take a look to the course curriculum and start at the level that suits you I have covered a
lot of advanced topics and you're going to have a lot of best practices in this course and this course is suitable for
you if you have experience in any other tools like in powerp and you would like to pick up a new skill in Tableau so
let's jump in and get started now we're going to have a quick overview of the tblo course I have
splitted this course into 15 different sections for example we're going to learn what is business intelligence what
is data visualizations what is Tableau and the history of Tableau and why Tableau is very powerful tool for data
visualizations after that we're going to go and deep dive into the Tableau product suit we don't have in Tableau
only one product we have eight different products so I'm going to go and introduce you to those products and
we're going to go and compare them side by side for you to understand the differences between them and I'm going
to help you to choose the right products for your project moving on we going go and deep dive into the Tableau
architecture here we're going to learn many different concepts like what is live and extract connections what are
the different types of Tableau files and then we're going to Deep dive into the Tableau architecture in order for you to
understand the main components of the architecture and how Tableau internally Works after all the theory we're going
to start preparing your environment in order for you to practice with me in this course so we will go and download
and install Tableau for free of course at your PC we're going to go and create free Public Accounts we're going to
download the training data sets and we going to publish our first visualization and at the end I'm going to take you in
a tour in order to make you familiar with the Tableau interface and after we have repaired your environment we're
going to start with the first topic how to create a data source in Tableau and here you're going to gain skills about
the data modeling so we're going to go through the basics of data modelling and as well how to do modeling in Tableau
and then we're going to go and learn four different methods on how to combine tables in Tableau using joints
relationships and data blending and of course we're going to go and compare them side by side for you in order to
understand the differences between them and when to use which method and at the end of this section we're going to go
and create two data sources moving on we're going to start talking about the Tableau metadata here you going to learn
very important Concepts in Tableau the data types dimensions and measures discrete and continuous values once you
understand those Concepts you can understand how to create visualizations in Tableau after this section we have a
small section about renaming so here we're going to talk about the naming conventions that each developer should
know then we're going to learn the different techniques on how to rename columns and tables in Tableau and at the
end we're going to learn how to give aliases to the values moving on to the next section you're going to learn how
to organize your data in Tableau and here we have different methods like grouping up the dimensions using
hierarchies grouping up the values using groups and clusters and then after that we're going to learn sets in Tableau and
at the end we're going to learn how to create pens in Tableau in order to create histograms and now in the next
section we're going to learn how to filter our data in Tableau and here you're going to learn the different
types and concepts of filters in Tableau how to create them and how to customize them and I'm going to give you 10 tips
and tricks about filters in Tableau and we will learn as well in this section how to sort our data after that we're
going to learn very important Concept in Tableau which is the Tableau parameters Tableau parameters are great in order to
add Dynamic to your visualizations so you're going to learn the concepts of parameters and then you're going to
learn different use cases for that how to make Dynamic calculations Dynamic reference line filters how to swap
measures and dimensions and to make as well Dynamic pens moving on to the next section we're going to learn as well
something about Dynamic so we're going to learn the Tableau actions in order to make your dashboards interactive so as
usual first you're going to understand the concepts of Tableau actions and then we're going to go through all Tableau
actions types for example how to go to URL how to go to Sheets how to filter data using actions and then how to make
highlights using actions and how to change the values of sets and parameters and after this section we're going to
have the Tableau calculations this section is very huge you're going to learn how to transform and manipulate
your data using four different Tableau calculations types so we have the RO level calculations aggregate calculation
table calculation and the LOD Expressions so in this section you you can learn more than 60 different Tableau
functions in order to manipulate your data moving on to the next section we have another big one we have the Tableau
charts here we're going to go and build together more than 63 different charts in Tableau so we will start with the
basic charts like the bar charts and we're going to end up building very Advanced charts in Tableau and at the
end I'm going to help you to choose the right charts for your requirements moving on to the next one we're going to
learn the Tableau dashboards we're going to go step by step on how to create clean dashboards in Tableau using
containers and now in the last section we have a tableau projects here in this section we're going to go together and
Implement a projects exactly like I do it in my real life projects so first we're going to learn the different faces
of each Tableau project then we're going to start with the requirements so you're going to learn how I analyze the
requirements of Tableau and then we start with the implementations of the projects so we're going to go and build
the data sources the charts and two different dashboards so with that you're going to get familiar on how to
implement projects and companies using Tableau so once you go through all those sections you're going to have a solid
knowledge about Tableau if you are new to the world of data you must start hearing a lot of
buzzwords from Big Data to iot data science data engineering and phrase it like data is the new oil in this
tutorial I will be covering some important buzzwords about the data and what they really mean so let's Dive In
we are living now in the data driven age and data is generated everywhere we people we generate massive amount of
data as we speak each click on the internet each search email or even if you are ordering something online we
generate data we spend hours every day on the social media liking commenting searching our smartphone is just all
time uploading data about where you are how fast you are moving and everything we do online is now stored and tracked
as data not only our smartphones and computers are connected to the internet and generates data but also we have
something called smart home we can connect any device at our home to the internet just put the word smart before
it we have Smart M smart lightning smart Fitness voice devices security systems all those devices could be connected to
the internet and start generating massive amount of data and this is what we call Internet of Things iot iot is
the concept of of connecting any device anything to the internet in order to generate and exchange data not only we
have iot at our home but also everywhere we are living in the digital transformation in the industry and
Manufacturing you might heard of the concept industry 4.0 the first Industrial Revolution introduced in
Germany it's all about smart factories connecting machines and devices to the internet in order to exchange data and
now we can find iots in the cities we are trying to implement those smart cities where we're going to connect
everything in order to reduce waste saving money improving quality we have as well iots in our cars our cars are
loaded with sensors and devices that are connected to exchange data for many reasons like driver assistance object
recognitions self-driving systems the list is just so long in 2022 we have around 14 billions of physical devices
things from small household cooking devices to the sophisticated industrial machines that are connected to the
internet generating and exchanging data the amount of generated data everyday is from iot social media
websites machines is truly mind-blowing there are currently over 44 zettabytes of data in the entire Digital Universe
that is 21 zeros so that means we are no longer dealing with normal traditional data we are dealing now with the big
data so what Big Data means there is three indicators that help us to understand whether our data is big and
are defined by the three V's the first V is volume well big data is Big with the growth of the internet mobile devices
social media iots the amount of generated data from those sources has grown dramatically the second V is
velocity in normal data processing we use to process slow data or we call it patch data once a day or something and
then we store it in the disk but in Big Data WS the sources are generating streams of data with very high speeds
that means we have to process and analyze the data in in realtime fashion and then we store it in memory instead
of disk and the third V is Variety in traditional systems most data types could be captured and Raw on structured
tables like database or excels but in the Big Data WS data often comes in semi-structured format for example
server logs in XML or websites or the data comes in unstructured format like videos audios images free text so in Big
Data we have not only to deal with structured data but also with semi-structured and unstructured data so
the Big Data terms means how we can efficiently store process and analyze our data when it has huge volume high
speed and different types in order to reveal significant values for the business but we still have a problem
with that all those generated data are raow data raow data are just unprocessed rows and rows of numbers that are really
hard to understand hard to read badly structured and almost has no value to the business almost 70% of the W's data
are unused raw data if left without processing and refining is just worthless waste of money waste of space
and it generate digital waste stores in very expensive data centers and that's why we have the very famous phrase of
the famous British mathematician Clive Hy data is the new oil well it means that we have to extract the row data
like we are extracting oil we have to refine it process it transform it into something useful and has value to the
business well what this really means is that most of the companies are sitting on very big field of a new oil raw data
and most of them understood that data is their most valuable asset they have to extract it they have to analyze it in
order to reveal Insight that could help them in order to make faster and better decisions and that's why most of the
companies are hiring Army of data workers as we know the demand for data scientist is increasing rapidly and the
supply is low so now what we can do with all those chaos all those generated unprocessed raw data well we can do the
following stuff so what we can do we can design or build a data architecture data
architecture is the process of creating blueprint on how we organize process and store our data into different layers for
different purposes so that architecture make it easier to manage protect and access our
data another thing that we can do with the row data is data engineering data engineering is very complex process of
Designing and building data pipelines and data storages in data engineerings we usually build ETL processes to
extract the row data from multiple sources then transform it and then load it to the Target storage in order to
make it highly available and usable for the data scientist or any other end user another thing that we can do is
data modeling so data modeling is the process of connecting the dots so what we're going to do is we're going to put
all the data into entities and objects then we describe the relationship between those entities in order to help
us and help the programs to understand how the data are related to each other another thing that we can do with
the row data is we can do data mining data mining is the process of analyzing massive amount of row data in order to
discover knowledge to discover business intelligence like patterns and Trends to solve problems and to mitigate
risks another use of the row data is that we can use it in machine learning in machine learning we are providing the
computers with two things first the RW and historical data together with the mathematical models and algorithms so
once the computer has those two things it's going to start training and practicing in order to perform tasks
like predictions so it's like human the more the machine practice and train the better and accurate the results going to
be and next we can do data science data science is the scientific study of data and it combines three major Powers the
power of programming languages together with the mathematics and statistics and the knowledge of specific domain in
order to uncover valuable knowledge and insights from our row data one more thing that we can use on
the row data and my favorite one is that we can use data visualizations so data visualizations is the process of
converting numbers and raw data which is normally hard to understand and to read into visuals and charts like Bars by
tree plots in order to make it easier to understand and easier to read which really helps in the decision making
there are many other things and processes that we can apply on the row data but these are the major fields of
work that we can use in order to convert the useless row data into knowledge that has significant impact of value to the
business [Music] all right let me tell you this story we
have shops in three different cities in Germany in stutgart we have shop Berlin and Hamburg and our three shops are
generating every business day a lot of raw data on Sales Inventory levels products staff cost and so on and now we
have group of people that are the decision makers like managers HR finance and they have many questions and
decisions to make so they might have questions for example what happened and another questions about what will happen
now if the managers try to find the answers from the row data they might find nothing and no answers because the
row data usually very complex and badly structures and they are really hard to understand and that's why they're going
to go and hire some data analyst for example in order to help them finding the answers from the row data so the
data analyst going to go and start analyzing the row data by doing some magic for example cleaning up the data
connecting objects together and aggregating the data in different levels and at the ends the result will be
communicated as for example spreadsheet to the decision makers and in the other hands the managers can hire data
scientist in order to help them finding answers about what going to happen or uncover unknown facts and insides so the
data science can as well go and start analyzing the raw data but this time using different methods like for example
data mining machine learning or train model in order to find new insights new knowledge and answers the question
question S at the end the output going to be communicated as well to the managers as numbers and spreadsheets now
both of the data scientist and the data analyst did amazing job working on the raw data and analyzing those stuff but
the problem here is that the output might be hard to understand and read Because those managers are usually
people that don't work directly with the data every day so this could lead to a big gap between those managers and the
results and now in order to bridge this Gap and make everything easier we can use the power of data visualizations and
the result presented from the data scientist and the data analyst should be converted from this boring numbers and
spreadsheets to visuals graphs and charts the visual representations of the data will just do the Magic by making
everything clear and easy and it's going to bring very easily the wow effect once you are presenting your results so it's
going to help the managers to immediately find their answers and they going to start making decisions using
the data this process we call it a business intelligence or as a shortcut bi so now the question is why
visualizations is so powerful with the simple Visual Communications you can make a huge difference since the start
of the humanity thousands years ago an early human use visuals in order to tell a story and until now in the modern age
the human still uses visuals in order to tell any story because we humans we are visual creatures we think in pictures
and in visuals if we see a tree our brain going to store it as a visual as an image in our brain studies say that
90% of the information transmitted to our brain is visual but if we read the word tree our brain has fair to
transform it to a visual before storing it which is way slower in fact the human brain processes visuals 60,000 times
faster than it takes more fact about our brain is that we remember most of what we see and interact with it's proven
then the human remember only 10% of things we hear and 20% about what we read and it's also proven that we
remember about 80% of what we see and interact with that's why we have the famous phrases of a picture is worth a
thousands words and seeing is believing having all those facts no wonder that in digital channels the visual content is
taking taking over posts tweets articles news presentations dashboards you can find visuals
everywhere so now the question is what is data visualizations or sometimes we call it data Vis data visualizations is
the process of converting boring numbers and raw data into interesting graphical elements like Bars by three blots and so
on so data visualizations brings the data to life makes you the master of Storytelling of the insights hidden
within your numbers so it's like an art of converting highly complex massive amount of data sets into something very
simple something very easy to understand and to interact with imagine yourself to be one of the managers and you have two
data analysts one of them is presenting the result in spreadsheet filled with numbers and the other data analyst is
presenting the result with visuals filled with graphical representations of the data and both are presenting the
same facts which report you will prefer I would go with the right one because the left one is just dry numbers pouring
and unlikely you will be able to spot any Trends and patterns so the main benefit of data
visualizations is telling a story which arms you with tools in order to make the right decision at the right time there
are many other benefits like seeing the big picture tracking Trends making smarter and faster decisions discovering
unknown facts acts patterns Trends and getting as well more engagement from the end users by asking more and better
questions all right so with that we have learned what is data visualizations and why it is very powerful and important
and next we will compare Excel to bi tools like Tableau and why you need to use Tableau instead of
excel over and over again I'm asked the same question why I should bother learning and using Tableau or power bi
for data visualizations if we have excel in this video I'm going to explain for you my six reasons why we should use a
more than bi tool like Tableau and Barbi and not use Excel for data visualizations and we start right now
there is around 1 billion users globally are using Microsoft Excel I worked in many companies and I can tell you people
are just addicted to excel they love it they use it for everything as planning tool data entry data analyzis and data
visualizations but the main problem here that the more a company grows the more it generates data and because everyone
is familiar with excels they going to keep using them in big data use cases and they're going to face really hard
time managing those spreadsheets and dealing with the limitations in Excel in these situations it's really time to
switch to a modern bi tool or data visualizations tool like Tableau or Barbi now let me show you how bi is done
with Excel we usually have different Source systems and data analyst that's going to go and start exporting manually
the data from those systems and import them in Excel and then some calculations going to be done and at the end a report
will be generated the Excel files then will be accessed from different business users in the other hand we can do bi
with a modern tool like Tableau so what we're going to do we're going to connect Tableau directly to those Source systems
and the data analyst can start developing a Rebo or dashboards in Tableau and at the end the business
users will access Tableau in order to see those dashboards so far you can say okay both look really similar so now
let's dive in in order to show you what is the real benefit of having a modern bi tool like tblo or Barbi and the
limitations that we have in spreadsheets like Excel the first benefit is automation if
you are using Excel and we made some nice reports it's time now to update the data and how we do that in Excel we
update data manually so some employee have to sit down every day and go through the process of extracting data
from those Source systems importing them in Excel do calculations and at the end prepare the reports over and over again
which is very time consuming but if you are working with the modern bi2 like Tableau we can automate this boring task
by creating schedule to refresh the data for example we can create a schedule in Tableau every day at 7:00 morning
Tableau should automatically connect to the data sources pulse the data and prepare the reports there is two
benefits of doing that first we eliminate the human errors which is very common thing in Excel and sometimes
those mistakes can lead to wrong decisions and to finance loss and the second benefit of course we no longer
needs employees that is dedicated only for this boring task of exporting and importing data manually to
excel another benefit here is the capacity if you are working with Excel and one of our source systems start
producing and generating massive amount of data here we have problem in Excel because we can handle around only 1
million records so our Excel file going to breaks and we're going to start getting error messages likes the data
set is too large so what we usually do in Excel we're going to go and start splitting the main file into small
multiple files in order to manage the huge volumes of data which is really hard to manage in the other hand if you
are working with Tableau we don't have to worry about all those stuff we have no problem in Tableau because Tableau is
made for big data use cases and can very easily handle massive amount of data so we might just change the connection type
from extract to live in order to handle it another benefit is security if you are working with Excel it's really hard
to hack into Excel even if you are using password protected spreadsheets it still can easily hacked nowadays and the users
are really used to share their excels in emails copy it USB or store it locally at their computers which is not secure
at all so all those stuffs could cost the companies a lot if sensitive and confidential data is accessed by
competitors but if you are working with modern bi2 like Tableau it going to provide us with Superior security
features like Advanced Access Control Data security network security and plus if you are working with Tableau we don't
have to export the data we can just share the dashboards and reports between employees and only if we grant them
access rights they can see the data another benefit is their role level security in many companies they have a
lot of confidential sources and they start to understand how important is to apply the principal need to know the
principles needs to know says a user shall only have access to the informations that's their job functions
requires that means we cannot go and share all data to all users we have to have some data restrictions for for
examples a sales employee should not see all data like manager and finance employee should not see all personal
informations like HR and so on that means if you are working with excels we have here again to split the main files
into specific reports for specific rule but in the other hands most of the modern bi tools they offer a feature
called Rowl security RLS row level security refers to restricting the roles of data as certain users can see based
on the policies that we Define using this technique going to enforce the need to know principle and going to make our
life easier by just having one dashboard accessed by different types of users and then based on their rule they going to
see the data and the informations that their job requires another benefit is reducing
chaos let me tell you how we usually work with Excel a data science will start exporting data from one source
system and he going to make a report called version one report and then for other requirements he going to make a
version two reports and eventually we're going to have a final reports and we have another data analyst working in
different Source system and the same thing going to keep happening few times back and forth and eventually we're
going to end up having different six versions of the reports and if we scale this impact you will notice that you are
slowly poisoning your business and the end user is going to have to access different versions of the reports and
now if we ask how old is the data in our reports we will get different answers when one version going to be 10 days ago
another one eight 4 and 3 days that's mean we don't have single point of Truth for our data and that's why having
modern bi tools going to help us to eliminate such a chaos and going to help us building a single point of Truth for
our data one last benefit that I would like to talk about is visuals although excels
offers visualizations but it is sometimes very limited when we are producing complex visuals in Excel is as
well creating visualiz Iz ation is very time consuming including a lot of manual steps and as well those visuals going to
be static and not interactive but in the other hand if we are using Tableau everything going to be automated and
super fast we can create new reports and Views very quickly by just drag and drop and they offer way more interactive and
cooler visuals than Excel all right the main reasons why I prefer working with Mod bi tools like
tblo and powerbi and not for data analyzes and data visualizations are automations security big data use cases
and interactive visuals it's not about Excel versus Tableau it's all about using the right tool for The Right Use
cases and not to misuse a tool Excel is a great tool that is used by billions of people because it's very easy to use
sheep professional spreadsheet for data entry and complex calculations but when it comes to data analyzis and data
visualizations we have way better tool than Excel like powerbi and Tableau and you can still use them together for
example you can do your complex calculations in Excel and the final result going to be imported in Tableau
in order to do better visualizations and to get more insight about the results the thing is the world is changing very
fast and the companies are generating massive amount of data so instead of using traditional spreadsheets like
Excel we have to use more powerful Tools in business intelligence to help us quickly find insights Trends patterns in
order to make faster and better decision so now the question is what are the best tools for data visualizations a
leading research company called Gartner publish every year the Gartner magic quadrants to show who are the leading
product in specific domain and if you check the magic quad for analytics and business intelligence platforms for the
last 10 years you can almost see always the same leaders we have Tau power pi and click view since 2003 12 and I'm
working with a lot of data visualizations tools and I can say that all those three tools are really great
tools they have their advantages and disadvantages but by just checking the data visualizations aspects I can say
that Tableau is here a winner because data visualizations in Tableau is a core concept and really the best tool for
data scientists and for Big Data all right the first question is what is tableau a quick answer could be Tableau
help us to convert this to this without any technical or programming skills so Tableau converts
complex and boring grow numbers into beautiful visuals and charts which is really easy to understand and the key
features in Tableau is interactivity easy to build and to use and fast performance we can call Tableau with
many names like a data visualization tool a business intelligence or bi tool or sometimes we call it a reporting tool
well Tableau is all of them but I choose to call Tableau a data visualization tool because data visualizations is the
core concept of Tableau now let's have a quick history about Tableau in 2003 tblo was founded
by three guys Pat Christian and Chris as a result of computer science project at Stanford University they focused in
visualizations technique to analyze data inside databases and then in 2019 Tableau was acquired by Salesforce in a
deal worth over 15 billion and for the last 10 years Tableau was named as a leader in Gartner magic cordance for
business intelligence Tableau has a clear mission to help people to see and understand
their data they really focus on keeping Tableau intuitive and easy to use that's why Tableau does not requires any
technical or programming skills in order to build amazing dashboards and insights that means the target audience of
Tableau is not only for technical users like it data analyst data scientists but also for all other non-technical users
like a business user an end user a teacher and so on this aspect is a GameChanger of changing the old mindset
of having only it and Technical people working with data and building visualizations but now we have modern
data visualizations tools like Tableau which opens the door for everybody to start start working with data that's why
tools like Tableau helps organizations to be data driven and now Tableau is widely used you can find Tableau almost
in all organizations Industries sectors in all departments because most of those organizations want to empower their
employees with tools like Tableau in order to make better faster and smarter decisions using data all
right tblo is not the only leader in business intelligence and data visualization Market there are many
other tools that are available like powerp click View and so on but now if you ask me what makes tblo so special
why Tableau is so widely used I would give you four reasons the first reason is performance
the sources now are generating massive amount of data and Tableau is designed and optimized to handle huge volumes of
data without impacting the performance in the dashboards and that's because is using high performance inmemory data
engine to help analyze large data sets where the data going to be stored inside columns instead of rows which can boost
the performance in dashboards tblo has no limitations or whatever to the number of data points in the visualization for
example on this view we have over 1 million data points without any problem this allows us to analyze large data
sets in order to find Trends patterns with a great performance and all other tools still inforce through size data
point limitations which is not really helpful for data analyzes the second reason is quick and
interactive visualizations compared to the other tools with Tableau we can create rich and beautiful visualizations
in just few seconds I'm going to show you now quick example how to Cluster my data and how to calculate the forecast
in order to do such a complex job in Tableau we will just use drag and drop so let's see how simple it is all right
so we're going to go to the order take the sales put it in the columns profit and the rows and take the order
IDs in the details and I want to see all my members over here and now we go to the analytics pan and then double click
on the Clusters so with that I have very nice four clusters of my data The Next Step I will create a forecast of my data
so I'm going to take the order ID put it in the columns and then we're going to take the sales I would like to change
the visual to bars so I have now here around five years what we're going to do we're going to go to analytics and just
click on the forecast and that's it so I have a forecast of two years of my sales and now I'm just going to go and put
them together in one dashboard so I'm going to create a new dashboard drag and drop the Clusters drag and drop the
forecasts and going to link them together with the filter and that's it so now we have both of them and if I
click around I will have an interactive dashboard for the forecast and for the Clusters
the third reason tblo is userfriendly as you can see we have done very complex analysis with just drag and drop without
writing any code and this is exactly what Tableau wants it's very intuitive and userfriendly and this is the major
strings of tblo it just opens the door for all nontechnical users to have a chance to work and play with data to
solve their daily problems without the need of it but in the other hand Tableau is integrated with programming languages
like python and R which opens another door for Advanced Data visualizations which might be used from data
scientists and the last reason is community if you are working with Tau well you are not alone you have a huge
Tableau community in the community we have around 2 million students and teachers and in Tableau public we have
around 5 million data visualizations that are published and there's around 200,000 questions and ideas that are
shared in Tableau forums having such a huge Community is a big Bloss for any tool it's very important because while
you are working with data you might face some problems or you have questions it's very important that you have a place
where you can go and ask your questions and get advices from other developers all over the world and not only that you
can as well get inspired from the shared visualizations from other developers you can find the important links about the
Tableau community in the video description below all right so my four reasons why Tableau
is one of the best tools for data visualizations are Tableau can handle massive amount of data very suitable for
big data use cases it offers beautiful quick interactive visualizations Tableau is intuitive and userfriendly no coding
or technical skills are required and the last reason table Community is very huge one more thing that I would like to add
that data visualizations is really one skill that you have to master as a data scientist or data analyst and Tableau is
an amazing tool for data visualizations that's why I highly recommend to learn or to get familiar with Tableau it's
going to be like a huge Advantage for your career all right guys so with that you know my reasons why I think Tableau
is a leader in data visualization and with that we have finished the first chapter of Tableau where we have covered
a lot of important terms of data and Tableau and in the next chapter we will have an overview of the Tableau product
Suite where I will introduce you to eight different Tableau products Tableau products in Tableau we have
eight different products and it's really important to understand them and understand the differences between them
so that's why I'm going to go and give you a quick overview of all eight table products and then we're going to go and
compare them side by side in order to understand the differences between them and at the end you're going to learn the
decision making process that I usually follow to choose the right product for your requirements so now let's start
with the first topic where we're going to have an overview of the the development process and products so now
let's go all right if you think Tableau is only one software then you are wrong if
you visit the homepage of Tableau tableau.com you will find many different Tableau products like Tableau desktop
public server cloud prep reader I can say other starts it might be confusing having all those Tableau products but
don't worry about it I'm going to explain them one by one so you can chose the right combinations of Tableau
products for you or for your organizations it's really important to understand the differences between them
the functionalities and the limitations of each Tableau products and let's dive in so Tableau product which contains
eight different products we have Tableau desktop Tableau public desktop prep server cloud public Cloud Reader and
Tableau mobile all right the first thing to understand is that we can split those products into two main categories
developer tools and sharing tools Tableau developers tools as the name implies they are tools that's going to
help you to build data visualizations by creating and designing dashboards charts reports or to do data preparations or
data engineering by preparing the data for data analyzis under this category we can find three Tableau products Tableau
desktop public desktop and Tableau prep and now in the other category we have the sharing tools those tools can help
you to share and collaborate your work work that you have done and created using the developer tools under this
category we can find five Tableau products Tableau server Tableau Cloud public Cloud Reader and tblo mobile all
right so now first let's focus on the Tableau products under the category developer tools and now we can go and as
well split the developers tools into two groups based on their purposes we have data visualizations and data engineering
underneath data visualizations we find two Tableau products Tableau desktop and Tableau public desktop and underneath
that engineering we have only one Tableau product and that's Tableau prep all right so now after we understood the
main categories and the main purposes of Tableau products we will go now and talk about the development process in
Tableau all right so basically we have three very simple steps in the development process in Tableau the first
step we connect our data to Tableau then in the next step we start building our data visualizations to do data anal izes
by creating report chart and dashboards and in the third step we share our work by publishing it the two products to do
these three steps are Tableau desktop and Tableau public desktop in many cases the quality of our data is bad and not
ready for analyzes that's why we add one more pre-processing step to prepare our data before we start building our
visuals and we can use for this step the product Tableau prep all right so now let's do deep Dives in into to tblo
developers products one by one in order to understand the key features and as well the limitations for each one of
them tblo disktop is a software you download and install at your PC with Tableau desktop you can connect to many
different Source types there are over 90 data connectors you can connect to Tableau server or to connect to files
like Excel text Json or to on Prem servers like my L and Oracle or to cloud like Amazon Google and Microsoft Azure
once you connect Tableau to your data you can start building your data visualizations in Tableau desktop you
will find many tools and functions to help you creating charts reports with just drag and drop and then you can
combine those different reports into interactive dashboards and after you're done building your views and dashboards
then you have three options to share your data by either publishing them to Tableau server Tableau cloud or to
Tableau public cloud or even you can store your workbooks locally at your PC all right so Tableau desktop is the
backbone product of Tableau as tblo developer you're going to spend 90% of your time using this tool tblo desktop
is a developer tool to build data visualizations where you connect your data build dashboards and then publish
them sadly tblo desktop is not a free tool like powerbi desktop in order to work with d desktop you have to buy a
license I think they offer some kind of trial phase or if you are a student you get get like one free year don't take my
words it's better to check the current offering from tblo in their homepage with tblo desktop you can connect over
90 different data sources you can publish as well your work everywhere to tblo server tblo cloud and tblo public
and since tblo discop requires a license you don't have any limitations or whatever on how many roads and data you
can store and process T desktop is meant for data analyst data scientist bi developers who work professionally in
companies in data anal iCal projects all right so that was a quick overview of the Tableau disktop next we will check
the Tableau public disktop so tblo public is the free version of tblo desktop it is very
similar to it it's a developer tool in order to build and publish data visualizations and since it's free and
requires no license it comes with few limitations in Tapo public we have a r 10 data connectors you can connect only
to local files at your PC another limitation of that you can store and process only 15 million rows of your
data and you can publish only to Tableau public Cloud so that means you cannot publish your work in Tableau server or
Tableau private cloud and the last limitation is that you cannot store your workbooks at your local PC but here I
have to be fair is that the most important part is that all functions and tools in order to build visuals and
dashboards are completely available in Tableau public like in Tableau desktop which makes really Tableau public as a
great alternative and tool for beginners in order to practice and to learn Tableau before they go and buy licenses
and to be honest that's why I decided to go with Tableau public in all my tutorials so that anyone can follow and
practice with me without having you buying any licenses tblo prep Builder is a software
you download and install at your PC and you can use it to prepare your data before you start analyzing it same as
tblo desktop you can connect to many different Source types there are over 90 data connectors like Tableau server
files on Prem cloud and so on once you connect Tableau to your data you can start building data flows where you have
access to tools and functions to help you to transform your data for example combining data cleaning filtering
aggregating and all other art of data engineering tasks to prepare your data for data visualizations and at the end
of your data flow you can store the new prepared data in three different places either as a file at your local PC or
publish it as a data source in Tableau server or cloud and the last option you can write the output directly in
databases and after you are done building the data flows then you can publish them in Tableau server or
Tableau online for automations and in Tableau prep you have the option to store your data flows locally at your PC
all right so TBB is a data engineering tool to prepare our data to get ready for analyzes sometimes the data that we
are connecting to Tableau desktop has bad quality and we cannot use it immediately in our dashboard that's why
we spend like hours and hours of cleaning up organizing combining preparing our data and that could be
really time consuming so for this situation we could use tblb to help us with this process so tblb is a developer
tool for data engineering where we connect to our data build data flows and then publish them and it's not free tool
it requires a license in t r we have over 90 different data connectors the output of the data flows could be stored
locally at your PC or as a Tableau Data Source or directly in the databases and we can publish the data flow either to
Tableau server or to Tableau Cloud tblo prep is not like tblo desktop we don't have any free version of Tableau prep so
there is no Tableau public prep all right so now let's go and have a summary of the three products where we
going to compare them side by side the main purpose of tblo desktop and public is to generate data visualizations but
the main task of tblo prep is for data engineering now if you are talking about the costs both desktop and prep requires
licenses but Tapo public is free to use and now about the security aspect of the data tblo desktop and prep are secure
since you can publish them to private servers but tblo public you have to publish your work to public platforms
where everyone can see your data so you cannot secure your data in Tableau public and the next Point data limits
since public is free it comes with the limitations of 15 Millions row but desktop and prep you will get no
limitations the next point is connectors in both desktop and prep you have over 90 different data connectors like files
API servers cloud and so on where in tblo public you can connect only to files and if we talk about the live
connections aspect the only tool offers live connections to your data sources is Tableau desktop you cannot make Live
Connections in Tableau public and in Tableau prep you have always to work with extracted data the next point is
about storing your files locally both tblo desktop and Bre allows you to do that by storing your work locally at
your PC but in Tableau public you cannot do that instead you have always to publish your work to tblo public Cloud
the last aspect is about the target audience tblo desktop is made for data scientist and data analysts but tblo
public is made for anybody wants to work with data visualizations and tblo prep is made for data
Engineers all right so now with this we have good overview of the three Tableau products for developments and now comes
at the question when to use which product so now let me guide you in my decision making process using the
following flu charts first we ask the question for which purpose if we need a product for data engineering then it's
easy we have only one Tableau product and that is Tableau prep now if we need a product for data visualizations then
we can ask more questions the next question do we need to connect to server API databases or to Cloud if the answer
is yes then we have to use Tableau desktop and if the answer is no then we ask the next question can our data be
public if the answer is no our data is confidential then we have to use Tableau desktop but if the answer is yes our
data can be public then we jump to the next question do our data sources contain more than 15 million rows if yes
then we have to choose Tableau disktop but if the answer is no our data sources have less than 50 million rows then we
jump to the last question do we need to have live connections to our data sources if the answer is yes then we
have again to choose tblo desktop but if the answer is no then finally we can go and use tblo public all right so if you
follow those questions and this chart you can easily decide when to use which Tableau
product all right guys so in the previous tutorial we splitted Tableau products into two main categories
developers tools and sharing tools now we're going to focus on the second category the sharing tools where we have
Tableau server cloud public Cloud Reader and tblo mobile and as the name implies those products can help us to share our
reports and dashboards with others and in the last last tutorial we have talked about the four steps of Tableau
development process now we're going to do Deep dive in the step number four where we're going to talk about the
different options that we have in order to share our reports and dashboards with others if you want to share your visuals
with your colleagues in your organization then we have here few options first you can install Tableau
server product on servers using the infrastructure of your organization and then you can start publishing and
sharing your dashboard there then your colleagues can either use their web browser or they can use tblo mobile app
on their smartphone or tablets to view and interact with your dashboards directly from the server the second
option we have we can install Tableau server products on cloud service providers like Amazon AWS Microsoft
Azure or Google cloud and then you can publish your dashboard there and the same thing here users can use web
browsers or Tableau Mobile in order to access your work the third option we have you can use Tableau private cloud
service here you don't have to install any Tableau server or anything you will get everything prepared from tblo Team
you can start immediately publishing your dashboard there and your users can consume it from tblo cloud and now let's
say you want to share your dashboards with everyone in the world and make it public then you can use tblo public
Cloud you don't have to install anything you can immediately publish your dashboard there and users all around the
world word can use their web browser to access your dashboards and data but they cannot use mobile app in order to access
Tableau public and now to the last option that I really don't like to use if you want to share your reports to
individual users you can send them a tableau file with the format twbx Tableau packaged workbook which
contains your data plus your reports and dashboards and then the users can view this file using Tableau reader software
installed at their p [Music] all right everyone so now in order to
understand the real differences between tblo server and tblo Cloud we have to understand the backend details and some
basic concepts about hosting servers let's go let's say we are startup company and we want to host our own
table application and build the entire infrastructure for that reason there is a long list of tasks that should be done
of course the first thing that you need to do is to go and buy some Hardwares and configure them like servers that
will run the applications and each servers need as well storage so we have to provide additionally storage
infrastructure like some hard disk driver and ssds servers needs to be as well connected to the internet therefore
we have to provide as well all the networking infrastructure once we have all those stuffs then we have all
Hardwares needed the next thing that we need to do is that we going to go and start installing and configuring some
softwares like we can install an operating system for example windows or Linux and many other middlewares once
the operating system is in place then we have to install and configure tblo server application once we have all
software and Hardware ready and running it's finally now the time to set up our Tableau project and we have to manage
the following tasks we have to start adding users to the Tableau server and map them to the correct licenses we have
as well to create schedules and tasks to refresh our data inside tableau server and then we have to start monitoring the
Tableau jobs all right so now we come to the big question that we have to answer who will manage what the first option
you have if you decide to manage all these layers that means we are talking about the on premises model so it's
clear ownership you manage everything from top to bottom Hardware the software and the project itself but now if you
say you know what this is too much to manage we don't have the money to buy all those stuff and hard Hardwares at
the start and we don't have the time to take care of them and maintain them then you will start thinking about
Outsourcing the Hardwares where you're going to buy a service from cloud providers like Microsoft Azure Amazon
AWS or Google Cloud so that they manage the hardware and you manage both software and projects and this is what
we call infrastructure as a service I the first letter of each word but now if you say you know what our it team is
very small we don't even have the time to keep those softwares updated each time Tableau makes a new release we have
to install a new version of Tableau server which is really wasting our time and we are not able to focus on our Core
Business project we don't have the resources to manage our own software then you start thinking about
Outsourcing the software layer to do that you can buy a service from Tableau it's called Tableau clouds where tblo
team going to manage everything for you both Hardwares and software and this is what we call software as a service
SAS okay guys so now let's summarize and compare the three hosting options the first point is about hosting setup on
premises you need Tableau server installed in your organization servers in as you need as well tblo server
installed in cloud service provider for example Microsoft Azure and in SAS you just buy tblo Cloud product and now for
the question who man what in on premises you manage everything the hardware software and your project and there is
no Outsourcing in is you manage both software and your project and the cloud service provider going to manage only
the hardware in SAS you manage only your business projects and Tablo going to manage both hardware and software so now
let's check the advantages and disadvantages of each service model for the on premises the good thing here is
that you have full control of everything the hard hardware and software and your data remains behind your firewalls this
is very important if you have critical or sensitive informations that should not stor outside of the company's
firewall but the drawbacks here you need a dedicated hardware and software administrators to deal with the
maintenance patching and many other tasks it is very costly at the start of the project you have to pay a lot for
the Hardwares and the softwares and it's not flexible it's really hard to scale up or skill down your Hardwares as
needed having all those stuff generally you have less time for your business projects all right so now let's move to
the is the First Advantage it gives you flexibility you can scale up scale down the Hardwares as the business needs and
there is no upfront cost for buying Hardwares but the downside of is is that you still need administrators to manage
your softwares to do installations patchings of your softwares and if you don't pay attentions for the cost you
might end up paying big bills now let's move to SAS the main advantage in SAS is that it allows your it team to focus
only on the Core Business projects and allows you to implement projects in very short time and the other good thing is
that your software will be always up to date Tableau team going to deal with that but the downside of SAS is loss of
control you will be at the mercy of Tableau team if anything bad happen like security problems all your
organization's data might be compromised and the other disadvantage is that you might have bad performance or networking
issues connecting Tableau to your Source systems and my advice here that you should avoid Reinventing the wheel
always take advantage of services that do things not part of your core business every hour you spend patching an OS or
installing updates for your software or replacing Hardwares is an hour not spent enhancing and refining your dashboards
in tableau [Music] all right everyone so now we're going to
do deep dives into Tableau sharing products one by one in order to understand their key features and as
well their limitations for each one of them and we start with tblo server and Tableau Cloud as Tableau developers in
organizations we need to share our reports and dashboards with the other colleagues in our organization so we
need to put those dashboards in a trusted environment or platform in our organizations and we usually have four
requirements the first requirement it should be safe and secure we want to control who is accessing our data and
dashboard second it should be easy to scale third it should be robust that can handles huge amount of users and data
and the last requirement it should be powerful and deliver high performance no one wants slow dashboards and reports
and now in order to build this trusted environment with these requirements we have two Tableau products Tableau server
and Tableau cloud and we have three hosting options on premises ASAS and SAS don't worry about the terms I'm going to
explain them Tableau server and Cloud they are very similar at the user interface level you will not notice any
differences but if you are checking the backend level there is a big differences between them so now first let's talk
about the user interface level of Tableau server and Tableau Cloud once you publish your dashboard to Tableau
server or Cloud you can share them by Prov find ing links to the users across all departments in your organization and
then the users they can access your dashboard using their web browser without installing any software at their
end and if you give them access they can start exploring your data in Tableau server or Cloud you can manage your
users by adding and removing them give them specific rules like admin creators viewers or Explorer you can manage your
users as well by adding them to groups another important task you can do in Tableau server or cloud is that so you
can automate your tasks for example you can create a refresh schedule to refresh your data sources on regular basis like
once a day in TBL server and Cloud you can monitor the tasks and schedules to check the status if the job failed or
succeeded and you can find many other statistics about the runtime the average queue and error messages and so on not
only the users can view the dashboards in Tableau server or Cloud but also they can create a new one if you give the
users enough rights they can even start creating their own insights and Views directly on their web browser without
having them to install any tblo desktop it's something we call self-service Pi all right everybody so now with this
we have clear picture about tblo server and Tableau Cloud so now let's talk about the other sharing Tableau products
Tableau public cloud is a free cloud service managed by Tableau team everyone in the world can share visualizations in
this platform so if you publish your dashboards in Tableau public everyone can access it interact with it and even
download it Tableau public is like social media you can edit your profile and add your personal informations in
Tableau public you have a huge gallery of visit built by people all around the world it hosts currently over 5 million
visualizations in Tableau public if you are browsing and you found some interesting dashboard like this amazing
dashboard from AAS you can add it to your favorites and then you can check what other visit did I just created and
published to public and like any other social media if you like her content you can go and follow her to see her new
updates and if you're inspired of one of her dashboards you can go and install the whole workbook to see how she did
build these amazing dashboards and see all details with that you are expanding the knowledge in Tableau development so
using Tableau public you can get inspired from others and you can get connected to other Tableau Developers
from all around the world and one more cool thing about Tableau public if you are searching for new job and you want
to flex your data visualization skills you can publish a lot of work in Tableau public and Link it in your CV so that
the companies can see how skilled are you in Tao so all these nice features makes Tableau public Cloud a very
attractive platform for sharing visualizations but now if you are talking about the security aspect it is
very limited the only thing that you can control is not allowed to download your visualizations or you can completely
hide it from others but you don't have any user access control like we have in tblo server or Cloud so Tableau public
cloud is a free cloud service from Tableau which host a lot of reports and dashboards built by people all around
the world it's a great platform to get inspired by Tableau Community build connections to other Tableau developers
and share your skills but since it's free it comes with few limitations the total size available for each account is
only GB your dashboard and reports are not connected to the source systems that means you cannot automatically refresh
your data in tblo public always you have to do it manually so you're going to open the reports refresh the data and
again publish it to tblo cloud and the third limitation of Tableau public is that as the name implies everyone in the
world can see and share your data that means you cannot use it in organizations since you cannot protect your data
[Music] Tableau reader is a software you download and install at your BC you can
use it only to view reports and dashboards but you cannot use tblo reader to create any data visualizations
or even edit it as you can see we don't have any tools or functions to create charts you can't even connect any data
sources or refresh your data Tableau reader is very old tool from Tableau it was created in the early days of Tableau
in order to share content build using Tableau desktop this was before even Tableau server and Tableau Cloud made
available at that time Tableau reader was the only option you have in order to share dashboard and Report with other
users so how it works you build data visualizations using Tableau desktop and then you send a file to someone else
then they going to use Tableau reader in order to view and interact with the dashboard that you built so to summarize
Tableau reader is a free tool it is just to view and interact with report and dashboard bu using Tableau desktop you
cannot create or edit anything in Tableau reader you cannot refresh the data inside your dashboard using table
reader each time you have to ask for a new copy if you want to have fresh data and there is no security features
password protections or login option this is big problem if the files lands on the wrong hand your organization data
could be exposed well I don't recommend at all using this tool in organizations the risk is just too big but if you want
to take take the risk and to share your visuals with one two three persons then use it but try to avoid
it tblo mobile is a free mobile app that you can download at your smartphone or your tablet you can use it to view and
interact with Tableau reports and dashboards published to Tableau server and clouds so you can use it only to
view the reports you cannot use it to create new reports or to edit the reports while tblo mobile is free to
download it requires a license to use and it can only access Tableau server and Tableau Cloud so you cannot use it
in order to access Tableau public and tblo Mobile going to automatically cash your reports and dashboards in memory
that means you can access them even if you are offline all right everybody so now let's
summarize and compare all Tableau sharing products side by side the first point about hosting Tableau server can
be hosted in your organizations or in cloud service providers like Azure or Amazon both tblo cloud and tblo public
Cloud are hosted by tblo team Tableau reader will just be software installed at your PC you can't even host it now if
you are talking about the cost for Tableau server you have to pay for licenses Hardwares and maintenance but
in Tableau Cloud you have only to pay for the licenses Tableau public and Tableau reader are free to use now if
you check the data security aspects both tblo server and tblo Cloud are highly secure Tableau public and reader they
are not next point is about the storage limitations in tblo server it really depends on the server dis space in tblo
cloud and reader there is no limitations but in tblo public Cloud the total size available for each account is only 10 GB
the next point about the connectors Tableau server and Cloud can be connected to different types of sources
like Cloud API Services files databases and so on but tblo public cloud and Tableau readers they cannot be connected
directly to any of your Source systems let's jump to the next Point Automation in Tableau server and Cloud you can
schedule tasks to refresh your data inside your dashboards automatically from The Source systems but the data
inside tblo public cloud and reader cannot be refreshed you have to do it manually you have to republish it or to
resend the file the next point about tblo mobile you can connect your smartphones or tablets only to Tableau
server or Tableau cloud and now to the last point we can use Tableau server and Cloud to share dashboards inside
organizations tblo public is used to share dashboards to the whole word and TBL reader is used to share dashboards
directly to individuals all right so now with this we have an overview of all Tableau
sharing products so now the question is when to use which product so let me guide you in my decision making process
following this chart all right first we ask all questions about the limitations inside tblo public Cloud the first
question can data be public if the answer is yes then we ask the next question should the data be frequently
refreshed in the reports and dashboards if the answer is no then you can go and use tblo public clouds but if the data
should not be public and should be refreshed automatically then we have to think about private hosting for the
question now do you want to manage the hardware if yes then you can use Tableau server on on premises as your
organization but if you don't want to do that and you want to Outsource it then you ask the next question do you want to
manage the software on your own but if the answer is yes then you can use again tblo server but this time it's going to
be hosted in cloud service provider like Microsoft Azure in is service model but if the answer is no you don't want to
manage the software by yourself and you want to Outsource it then you can go and use tblo cloud as a SAS Service as you
can see TBL reader is not in my decision making process since I don't recommend it at all so now if you combine this
flowchart with the one that we built previously for developers tools you will get my whole decision making process
that I usually use when I start a new Tableau projects so if somebody asked you when to use which tblo product you
can go through it and find the right combinations for you or for your company all those materials you can find it in
my website all right everyone so with that we have covered all eight Tableau products and we understood the
differences between between them in the next chapter we will learn the Tableau architecture to understand how Tableau
internally works and what are the main components of Tableau Tableau architecture now we're
going to go and understand how Tableau internally Works its components and its limitations so now we're going to go and
cover many important Tableau Concepts like what is live and extract connections what are the different file
types in Tableau and then we going to start drawing the Tableau desktop architecture and then we're going to
jump to Tableau server in order to understand different scenarios like the publish process authentication process
and accessing view process and after that we're going to go and complete the big picture by drawing the server
architecture and its components and at the end we're going to cover as well the architecture of the Tableau public so
now let's start with the first concept the live and extract data connections so now let's
go how we come to the most important decision or questions that's we're going to make make inside data source do you
want to store an extra copy of your data inside Tableau so here we have two designs for the data source either
you're going to say no we don't need to copy inside Tableau the data should stay where it is in the source systems then
what going to happens each time your visualizations needs data it going to sends quaries directly to the external
database and then the database going to send the results back to your visualizations so the data comes always
fresh from the s sources directly to your dashboards this type of the connections we call it a live connection
or you're going to say yes let's have a copy of our data inside Tableau so a snapshot or subset of the data going to
be copied from the external database to Tableau this copy we call it an extract and now each time our visualizations
needs data it going to send queries this time to the extract instead of the external database and then the extract
going to return the results back to your visualizations and since the extract is inside Tableau and very close to the
visualizations we will get great respond time and very fast performance this type of connection we call it an extract
connection all right so now the question is which connection type should I use in my data sources the typical answer for
this question is well it depends because here we have a tradeoff between performance and data freshness for
example if for you the performance is way more important than the data freshness then you have to go with the
extract since the dataa going to be stored inside Tableau in memory using the column store technique you will get
just great performance but if you say you know what the data freshness for me is more important than the performance
then you have to go with the Live Connections in your data sources because you will always get fresh data directly
from the sources in your dashboards all right so now if you want to send Tableau files directly to the
users we have to ask ask the question which type of files we're going to send because in tblo desktop we can generate
not only one file we can generate five different types of files in Tableau so now we're going to have like quick
overview of those types of files to understand them and to know when to use them all right so as we learned the
Tableau workbook contains three things the extract the data source and the visualizations there is a file type for
each combinations depend on your requirements for example if you want to share only your data without anything
else no data source no visualizations then you can send an extract as a hyper format but now if you say you know what
I've done a lot of work in the data source I built a data model I renamed stuff I did aggregations I created a lot
of new columns so I would like to share that with my team with my colleagues and I'm not allowed to share my data with
them so in this situation you say okay I'm going to share the data source with my colleagues and we call it Tableau
Data Source TDS without data or you might be in other situation where you say you know what my colleagues don't
have an access to the source systems we cannot use the live connection and you don't mind sharing your data as well so
now you can send them a package of an extract and a data source so the file type here called tblo package data
source DDS X so this type of file contains both of your data and your data source and we might be in another
situation where our colleagues or users they are interested as well in the visualizations so we can send them a
file with the visualizations and the data source and here again we have the same situation you decide whether you
going to send with it a data or not so if you don't want to send the data inside it you can send a file called
Tableau workbook TW WB and the last scenario I think you already guessed it if you want to send everything the whole
package the extract the data source and your visualizations then you can go and send your colleagues a tableau format
code tblo packaged workbook twbx all right so as you can see Tableau
did design different types of files for different purposes so depend on the situation or the scenario that you have
you can share your work with your colleagues all right so now generally speaking we have two different types of
workbooks a workbook with data using extract connection and another book without data using live Connection in
one hand in the workbook with data you can send three different types of files you can send only the data using hyper
format or send the whole data set with the data using TDS X format or send the whole package with the format TW wbx and
in the other hand with the workbook without data you can send only two files the data set without data TDS or the
workbook wbx and now you might have the question and you say okay which Tableau products should I use in order to open
these Tableau files well we have three Tableau products tableau Des toop Tableau public and Tableau reader with
the Tableau desktop you can open everything you can open all these different Tableau formats and files but
with the Tableau reader and public you can open only the Tableau packaged workbook TW wpx since Tableau reader and
Tableau public cannot connect directly to the data sources and they cannot use the live
connections all right one more thing to understand about Tableau workbooks is that Tableau uses two different types of
data to store the workbook the first one is the metadata information it will be stored in XML files metadata is data
about your data it describes your data it contains all informations on what have you done in the workbooks anything
you click drag and drop or do while working with dblo desktop will be reflected in some way in the metadata
you can find informations for example like column names data type data model and so one and the second type is the
data itself the actual data if you load data inside Tableau Tableau going to store it in format of hyber file where
the data going to be stored in column store methods in the memory of Tableau it is like special formats for fast data
retrieval all right if you understand the Tableau architectures and how the components are connected to each others
everything going to make sense for you as you are working with t and as well it going to makes you a
better Tableau developer so I will be sketching the concepts in order to make it easier for you to understand so let's
go the TBL architectures contains four different layers The Source layer the disktop layer server layer and the
consumer layer we will start unboxing each layer one by one to understand their components and we're going to work
with this architecture from left to right so we will start by The Source layer and we're going to end up by the
consumer layer all right so now we have the source layer The Source layer is outside of
Tableau and it contains the source of our data so our data could be in databases like MySQL or Oracle or the
data could be in files like Excel and Json or even in the cloud like Amazon AWS or Microsoft Azure or even in epis
so our data could be everywhere all right so now back to the big picture let's jump to the next layer
we're going to unbox the desktop layer the first component in tblo desktop is the data source before you start
building your visualizations you must set up the data source the first thing that we're going to do inside the data
source is to connect Tableau to our data Tableau offers around 90 different data connectors so we can connect Tableau
almost to anything once you build the connection between Tableau and your source of data the access information is
going to be stored inside the data source for example the path of the file location of servers username passwords
or access tokens and so on so all these informations going to be stored inside the data source all right so the two
types of data Connections in data sources are extract and live connections so now we connected to data we decided
which type of the connection the next thing that we have to do in the data source is to start building our data
model and we can do that by combining tables together using relationships joins and Union and you can do many
other stuffs like setting the right data types doing aggregations renaming stables and columns creating new
calculations and filters and so on all right so now to summarize the data source component in Tableau contains the
following informations we have the data connectors to connect Tableau to our data we have the access informations
where the locations of our sources going to be stored and as well we can decide whether we're going to load an extra
copy of our data inside Tableau we call it an extract connection or we're going to leave it as Live Connections in the
data sources and the last thing we have the data model inside data sources where we can combine tables together and do
aggregations or we can do some other custom stuff all right so once we are done with the setup of the data source
we have the connection whether it's extract or live we have our data model and everything is ready now we're going
to go and start building our visualizations and Tableau organizes the visualizations in three levels the first
one is the worksheets so we can use the data available in our data sources to build a single view only one visual it
could be a bar charts a pie charts or a table View and as you can see each worksheet is connected directly to a
data source but in Tableau you can build a worksheet from two different data sources by using very powerful combining
methods called Data blending and this is very unique feature in Tableau you cannot find it in any other bi tools
where the data in one visual can come from different sources and once we have the these different worksheets we can go
to the next level where we start combining these worksheets into One dashboard to show the different visuals
in only one view but keep in mind if you want to do any changes in the visuals you have to go back to the worksheets
and do the adjustment there and now we come to the last level we have the stories as you know the main goal of
doing data visualizations is to tell a story so you can build like a sequence of worksheets or dashboards that works
together in order to tell the users story based on your data all right so now you might ask me which visualization
level is the right one for you well if you have only one visual then go with the worksheet but if you want to build
some kind of qbi to monitor process then build a dashboard and if you want to present your data and tell a story from
it then go and build a story all right so now we have in Tableau desktop both of the data sources and the
visualizations and these two components are contained in something called a tableau workbook so now the question is
after you're done building your data sources and visualizations what can you do with this workbook well you can share
it with your colleagues in your team or department and there is two ways to do that either you're going to go and send
a tableau file directly to the users or you're going to go and publish the workbook to a tableau server or cloud
and from there your users and your team can access your workbook all right so now back to the big picture
the Tableau architecture let's talk about the ler on the right side the consumer layer there is different ways
to consume Tableau visualizations depends on the users's clients and on the tasks the users do so we start with
very small group of users that they might use Tableau reader to view and interact with Tableau visualizations and
they usually don't want to edit or create something new for this group of users we're going to send them a TBL
file as we learned they're going to need the Tableau packaged workbook twbx and we might have another group of
users usually they are your team colleagues they want to build analyzes on top of your work they're going to use
dblo disktop to do that for them we can send any kind of Tableau files depends on their requirements and their tasks
and now we have a big group of users or consumers that they can access Tableau server or Cloud to view and interact
with Tableau visuals they can use their web browsers like Google Chrome and Firefox to access the content of tblo
server and from there they can view interact and even edit the visualizations if they have enough
permissions or they can use Tableau mobile app on their smartphones or tablets to view and interact with your
workbooks but they cannot use it in order to edit the table visualizations so for this group of users you will not
send them any files first you have to publish your work to the server and here we have two options either you're going
to publish only the data source or you're going to publish the whole workbook to the Tableau server or cloud
and after that you're going to share the link of your workbooks to the users and now to the last group of users that's
worth mentioning they are the static users you can always export your data and visuals from Tableau desktop and
send it directly to the users as a BDF or Excel so of course it's static and they cannot interact with it all right
so so far in the Tableau architecture we talked about the source layer we did Deep dive in the Tableau desktop and its
components and we understood the different type of consumers and the clients all right so previously we start
sketching the Tableau architecture where we learned about the source layer the desktop layer and the consumer layer now
we going to unbox the server layer in Tableau architecture and in order to better understand Tableau server
components I'm going to walk you through three three scenarios from the user point of view what can to happen exactly
in tblo server once we publish a workbook or when we log into the server and access a workbook so let's
go so let's say that you want to publish a tableau workbook with an extract what going to happen tblo desktop going to
request the server to upload the workbook twbx and the first component in TBL server that going to receive the
request is the Gateway the Gateway knows how to forward the request the right server components and in this situation
the right component to process the publishing is the application server so the Gateway going to forward the request
to it and as we learned the Tableau workbook holds two different types of informations the metadata stored in the
XML files and the data itself stored in hyper files and in Tableau server those two different types of files going to be
stored in two different places the application server going to send the XML file to be stored in the server
component called repository and the Hy file going to be stored in another component called the file store so what
we have learned so far the Gateway is responsible to forward the request to the right component the application
server is the one that going to handle the publish process the reposter going to store the XML files the metadata of
the workbook and the actual data the hyber going to be stored inside the file store all right so now our workbook and
our data are published to Tableau server it's it's time now for our users to log the Tableau server and start interacting
with our dashboards so let's see how this going to work let's say your manager is Michael Scott and Michael
wants to check your sales dashboards in Tableau server and I am going to do it I need a
username and I have a great one and once Michael give these informations a request going to be sent
to the server as HTTP request the first thing that's going to hit is the Gateway the gateways notes that the application
saver is the right component to handle the authentication process so the Gateway going to forward it to it and
then the application server going to ask the reposter to check if the credentials username and password are correct and if
Michael has permission to access our server and then the reposter going to check and if everything matches and
Michael is allowed to access our server it will respond back to the application server and going to say yeah we know the
guy he is in our records then the application server going to start building the server UI and send it back
to the Gateway and then the Gateway going to send it back to Michael browser and now he is inside our Tableau server
so what we have just learned from this process again the Gateway is responsible of forwarding the request to the right
component the application server is the one that going to handles the authentication process the reposter
going to store the user credentials and if the users have an access and permissions to our server and the
application server is the one that renders the web interface of the server all right so now Michael is
inside our tblo server and he going to start browsing and searching for your sales dashboard and once he find it he
going to click on it and try to access your dashboard so now let's see what going to happen in Tableau server and as
usual the HTTP request for accessing going to be generated and sent to the server and we know by now that the
Gateway going to receive the request and start forwarding it to the right component the application server and
then application server going to start render the Chrome around the viz all those icons and images that are not
inside the dashboard itself and then the application server going to say okay now we are talking about visualizations this
is completely out of my league we have to forward this request to the master to the brain it is the vql server it is the
one that deals with visualizations and from here the vql going to take over and going to say okay first thing first
let's check if this guy Michael is allowed to see the sales dashboard so the vql going to ask the repository and
in the repository there is a list of users and reports so it's going to search there to find any matches if yes
then it's going to send back yeah Michael is AOS and he's allowed to see the sales dashboard and now the vql
going to say all right now we need data so first we need the metadata of the dashboard and as you know after we
publish the workbook the metadata going to be stored inside the reposer so the visq going to request from the reposer
one more thing is to send the XML file of the dashboard the reposter then going to send back the XML to the vql server
and the server will start building the dashboard all right so now the vsql going to say okay now we have the
dashboard but the problem is it is empty we need the data to fill it and it's better to ask our data specialist and
that is the data server the data server is the one that knows everything about the data so it's going to say all right
for this dashboard part of the data we have it already inside tblo server but the other part is sadly outside of
Tableau to get the data inside Tableau server from the extract the data server going to send the query request to the
data engine and the data engines knows how to query and extract the needed data from the file store so the data engines
going to get the data from the file store and it's going to send it back to the data server and now we come to the
part where the data is living outside of Tableau server here the data server going to act as a proxy where it's going
to use the data connectors to connect to the external data databases once the connection is established it going to
send a query that matches the language that the database speaks and then the database going to R return the needed
data as a raw table and now once we have all the needed data inside the data server it's going to combine it and do
another Security check so the data server going to check is Michael allowed to see all data or should we filter the
data so the data server going to filters the data depends on the data security setup that you have made and then it
going to send the raw data back to the the vql server and now once vql server has the raw data for the dashboard it's
going to do now the Magic by turning all those numbers and row data into images and visuals and it's going to put it
inside the workbook so now finally the vql has everything it needs the sales dashboard is complete and ready so the
vql going to send it back to the Gateway and the Gateway going to send it back to the web browser of Michael so Michael
can start interacting with the dashboard and now will hm does Michael have any idea what to do with the sales
dashboard I declare Banky all right I know there was a lot
of stuff going around in this scenario but we have covered most of the Tableau server components so let's have a
summary and understand what we have learned so far as usual the Gateway is responsible to forward the request to
the right component the application server is not responsible for the visualization process but the visl
server is the one that is responsible of building the visualizations the repository going to store informations
about the permissions and security which users are allowed to access which dashboard and the data server going to
manage both of the extract and live data sources and the data engine is responsible of retrieving the data from
the extract inside Tableau and the data connector is going to help the data server to connect to the external
sources and the vql server does the magic of transforming the raw data into visuals all right so so far with those
three scenarios we covered the most important comp component of Tableau server in this video you will learn
about the Tableau server architecture and then we're going to do a deep dive into each server component of the
architecture to understand how it works and what it does and we start right now the server layer contain mainly of three
stuff two interfaces left and right and in the middle we have bunch of server components the left interface is the
data connectors they going to connect the external Source systems to tblo server components and in the right side
we have the Gateway it going to receive requests from different clients and it going to connect it to Tableau server
components all right so now let's go more in details about the gate component so in one hand we have requests come
from different clients like a login request from web browser or a publish request from Tableau desktop and in the
other hand we have different Tableau server components like the app server vql server and so on and the Gateway
going to be in the middle that knows how to forward the requests from different clients to the right server components
and the other task of the Gateway is balancing stuff around let's say that you are working in multi- Noe
environment where you have two nodes when the Gateway receives the first request it going to forward it to the
node number one since both nodes are free but now if the Gateway gets a second request it going to say oh node
one is full let's process this request in node number two since it's free and so on all right so the Gateway in
Tableau server is like a distributor that knows everything you know something someone like that let's just say I know
a guy who knows a guy who knows another guy so the Gateway has two tasks first it Roots the client requests to the
right component and second it does load balancing if you are running tblo server in distributed environment all right so
now we're going to start talking about those Tableau components in the middle and in Tableau server there's like
different Arts of components we have servers we have engines and storages and we're going to start with the servers as
you learned in tblo server there is like different processes that login process publish accessing workbook and so on and
in tblo server they designed different servers for different processes so let's start now with the application server
the application server is responsible for different processes like as we learned a user login request going to be
forwarded to the application server then the application server going to check with a repository or an active directory
depend on your configurations to find out if the user is allowed to access the server or not and the other process the
application server handles is the publish process where the application server going to get the publish request
and it's going to split the workbook into two files the XML file to be stored in the repository and the hyper file to
be stored in the file store and one more task for the application server is to render the server interface all those
little stuff that you find in Tableau server like icons images projects minus it is the application server who render
those stuff so the application server is responsible for different processes like the authentication and authorization
process the publish process and rendering the server UI but one process that the application server will never
do is the visualization process all right so now we're going to jump to the next server we have the vql server this
one going to be interesting all right so previously we talked about the power of visuals and how human brain transform
text into visuals and images the vql is like our brain it can ad do the Magic by converting numbers and text into Visual
and images this quill stands for visual query language for databases the found of Tableau Chris and bat they did invent
this language let's say that you drag and drop something in Tableau the vsql going to convert this action to an SQL
query and then send it to the data server to get the data then the data server going to send the results back to
the vql as raw data and now vql going to do the Magic by converting those raw data into visuals and images presented
at your client all right so the vql is the brain it is very important Tableau component and responsible of the
visualization process and mainly it does two things it's going to generate queries from user action and it's going
to convert and transform the row data into visuals and images all right everyone so now we're going to talk
about the third one we have the data server so the data server is the one that knows everything about the data it
knows where to find the data how to connect to it and how to speak to it the first task of the data server is to
manage both extract and life data sources if the data is inside Tableau it going to send query request to the data
engine but if the data is outside Tableau it can to use the data connectors to send query request to the
external sources and the data server knows how to speak to the sources it act like a proxy to the data sources can
speak many different database languages so that it send a query request in a language that the database understands
and we have another task for the data server is to handle the data security it checks if a user is allowed to see the
data and do filterings if needed and the data server manages as well the driver deployment so the data server is the
central data management component in Tableau server and the one that knows how to get data from the sources all
right so now let's jump to the next component we have the data engine if we decide to store our data inside Tableau
as an extract then the data engine going to be the one dealing with it different components can send request to the data
engine like for example the data engine can receive a request from application server to publish a new extract then the
data engine can execute and create operation to create a new extract and store data inside it the data engine can
receive as well a query request from the data server asking for data so what going to happen here the data engine
going to find the correct extract it's going to connect to the hard driver and then it going to pulse the needed
extract from it and at the end the data going to be sent back to the server and finally the data engine can receive a
request from the backgrounder to update the content of an extract so the data engine can execute an update operation
by opening the extract and updating its content with the new data so the data engine in Tableau is like any other
database engine it does different operations like it queries the data it perform insert and update operations and
it create new extracts but only for the data inside Tableau server inside the extracts okay the next component is the
reposter as you might already noticed the reposter was involved in every tablet process so let's talk about it
the reposter stores many different types of data like for example it can store the workbooks that we published to the
server but only the metadata parts not the data itself so the XML files from the workbooks can be stored inside the
reposter in the reposter we find as well the usage data it's data that going to help you to understand the performance
and the traffic about your project like for example you can find the total number of active users inside tblo
server what is the total view counts by day and you can find out the most used data sources in your projects another
type of data that you're going to find inside the reposter is the security informations for example which users are
allowed to access your content or which users are allowed to access our Tableau server all right so as you can see in
the reposter there is different types of data and it contains as well huge amount of data in tblo server but it's very
important to understand that is the data inside our dashboards and reports are not stored inside the repository we have
many other Tableau server components that's worth mentioning like for example the cash server it stores almost
everything like images icons results of queries dashboards and so on so if you start a dashboard that that is already
accessed before the data going to be pulled from the cache server another component is the backgrounder in Tableau
server you can create a schedule to refresh the data inside your extract and the task of the backgrounder is to check
this schedule each 10 seconds and then trigger the process of refreshing the extract if the time comes and the last
component that I would like to mention here is the search and browse the users of Tableau server they can search for
content and this component is responsible for searching inside the repository and return the result to the
users all right everyone so finally we have the last puzzle the server components if we put it in the
architecture we will get the whole big picture of Tableau architecture so now let's go and do very quick summary that
Source layer it is the one that is outside Tableau and contains our data and it could be anywhere like databases
or files in the desktop layer the developers can start connecting Tableau desktop to the data sources with either
copying the data inside Tableau using an extract connection or with a live connections to the sources then the
developers can start building visualizations using worksheets dashboards and stories and both of the
data source and the visualizations we call it a workbook and we can either send it as a file or share it to the
server the server layer going to host our workbooks and we can find many components like the data connectors to
connect our sources to the Tableau server and the gateway to connect the client request to the Tableau server and
we have the application server responsible for the login and Publishing process processes the vsql server
responsible for the visualization process and the data server is the one responsible for the data management and
we have another component like the data engine that's going to handle the extracts and in Tableau server we have
three places where the data going to be stored and we have the reposter that contains many different data like the
XML of the workbooks and the security objects but not the data itself because our data going to be stored inside the
file store as an extract and we have the cache server that contains many different types of data to increase the
Tableau performance and the last last one is the consumer layer here we found the different groups of users and
clients like the Tableau readers that needs only the twbx files directly from the Tableau developers and another group
of users that they're going to use Tableau desktop to develop new views and we have the static readers that's going
to receive files like PDF and Excel and then we have a big group of users that's going to access Tableau server using
either web or Tableau mobile to interact with the published workbook all right everyone so one more
thing that I would like to show you is this amazing dashboard from Tableau team it's going to show you the different
component inside Tableau server and how they going to interact to do a task so for example if we go to the workflow or
to the process we can select for example access View and then we can to select whether it's like an published extract
or live and over here we have like slider if you drag it to the end you're going to see how the components are
interacting with each others to do the tasks and and on the right side you will see description for each step and this
is really great way to learn how tblo server works I learned from this a lot for this tutorial so make sure to check
that if you want to see more details about other processes in Tableau server I'm going to leave the link in the
tutorial materials let's start with the source of our data in tblo public you can only
connect files like CSV Json Microsoft Access and Google Sheets the next component is is Tableau public desktop
it is free version of Tableau desktop it's software that you can download and install at your PC so here we start by
connecting Tableau public to our files by creating a data source and in the data source we have only one type of
connection it is the extract so the data should be copied from our files to be loaded inside Tapo public desktop so
there is no live connection option and then after that we're going to start building our visualizations or we call
it visit and now once we are done building the views and the dashboards using tblo public desktop we have here
only one option to share it and that is to share the whole workbook your data and the visas to Tableau public and tblo
public is a free platform hosted from Tableau team to share the visualizations from the whole world and once our visits
are published to Tau public they can be now consumed from users all around the world and here we have few options the
users can use their web browsers to view and interact with your visualizations or users can download the whole workbook
your data and the vises in different formats like Tableau file twbx or Excel PDF images and so on and the last option
of consuming your visas can be embedded into your websites and blogs okay so now since Tableau public
is free it comes with few limitations at the source level we can connect Tableau public only to files the data connectors
are very limited and we cannot connect for example to servers and in the next level at the public desktop level there
is limitation in the data source we have only one type of connections and that is the extract so we cannot have a live
connections to the sources and the workbook itself it can contains only maximum 15 million rows and we cannot
save the workbook locally at our computer the only option to share it is to publish it to the Tableau public but
there is like a work around for that I'm going to show that in the next tutorial all right so now let's move to the
sharing level to Tableau public here we have as well few limitations for example the total available size for each
account is only 10 GB and there is no way to refresh your data automatically each time you need new data you have to
manually republish the workbook with new data and the third one it's going to be public so there is no way to make it
like private and to share it with only few people you have always to publish it to the whole world and now let's move to
the final level we have the consumers the only limitation here is that you cannot use Tableau mobile to access and
interact with the visualizations all right everyone so I decided to use tblo public in this Tableau course since it's
free and all of you can follow me with the examples without having you to pay for extra licenses and the limitations
that we have in Tableau public they are not really relevant for the learning process so the main features of Tableau
the data visualizations that we have in Tableau desktop they are all available as well in tblo public without any
limitations so don't worry about it all right everyone so with that we have learned the Tableau architecture and its
components and we learned how Tableau internally works and with that we have covered the theory parts of Tableau and
in the next section we will start preparing your environment so you can practice Tableau with me during the
course so let's jump [Music] in all right so let's start with the
first step we're going to go and download Tableau public desktop so in order to do that we're going to go to
the website public. tableau.com I'm going to leave the link in the description and from there we're going
to find the menu create and then we're going to click on that then we have download tblo desktop public edition so
let's click on that and then we're going to go to the middle and click on download Tableau public and now before
the download starts we have to fill out this registration Forum this is not for creating public account it's just
something before download starts so we're going to give the first name last name email and Country and then we're
going to click download the app and then the download going to start it's just 500 megab so it should not take long
time and now we have the download is done so let's click on the execution file to start the installation process
okay so at the start of the installation we are at the welcome page and here as usual we have to read and accept the
terms so you have to do that and here we have second box you can click on it if you don't want to send the product usage
data to Tableau team it's like cookies I don't mind I'm just going to leave it so we click now install and once you do
that the installation going to start it should not take long time okay so now the installation is done and Tableau
going to be launched automatically okay so let's go back to the website public. tau.com and on the
right side at the top we're going to click on sign in and then we have to click on this join now for free now we
have to fill out this registration Forum in order to create a new tblo public account so we have to enter the name the
email the password and the country and then we have to read an agree on the terms and let's click here I am not a
robot and at the end we're going to click on create my account and now we got the message to verify our account so
that means we have to check our emails in order to activate our account so let's do that okay so now after checking
I got an email from Tableau so I'm going to click on it and then I'm going to click on verify now in order to activate
our account so I'm going to click on that and then it going to send me to my account and with that we have brand new
active Tableau public account well it's like any other social media account you can add your personal informations for
example we can add our photo or Avatar so let me check what I can do over here so I have this photo from studard
television Tower it's amazing there and then I'm going to click save and we can add many other stuff so let's click on
edit profile and as you can see over here you can link your social media accounts or add your websites and so on
so let's click save if you want to learn any new tool like tblo powerbi or any other
programming languages you need always a good data set for training and practicing I start searching for good
training data sets and after a lot of research I downloaded like many many data sets but I was not happy with them
I didn't like them because they don't cover all the scenarios that we need for training let me tell you why this is an
issue in real projects your data going to be stored typically in data warehouses or data leaks inside many
many different tables and the first step in any visualization tools like Tableau or powerp is to connect those tables and
combine them in one big data model so training with only one table not going to help you and prepare you for real
projects and that's why I decided to make my own data sets to cover all the training scenarios and to have multiple
tables in order to learn how to combine the them in one data model and of course you can use my data set in order to
learn anything else like SQL Python powerbi and so on so let's see what I have prepared for
you all right the first thing that we going to go to the link in the description and then you're going to
land in my website where I've have collected all the course downloads and materials in one page so for example
you're going to go and download the training data sets we have here some important links the three sheet sheets
and many Skitch notes that I have prepared for this course and the as well you're going to find for each section
what are the important links and sketches and as well the Tableau files this link going to be available for you
after the course as well so you can always come back here and download the stuff that you need and of course for
free but now what we're going to do we're going to go and download the training data sets that we need for our
course and here as you can see we have two zip files one for the non EU and one for the EU so if you are currently in
Europe what you're going to do you're going to go and download these data sets but for all other countries you're going
to go and download the first data sets the non-e training data sets and now you might ask what is the differences
between them well it's about the decimal numbers since in our data set we have different decimal numbers like the sales
in different countries we have different representations of the decimal numbers so all the European countries they use
for example the comma to separate the decimal from the whole number but in many other countries USA in Asia we have
the dot in order to separate the decimal number from the whole number and if you are using the wrong format what's going
to happen table will not understand understands that this field is a decim number and it going to convert it to
string so now dep bend on your location go and download the data sets for me I'm in Germany so I'm going to go with the
second one and as I said it's depend on your location so let's go and click on that so next what I'm going to do I'm
going to go and grab the zip file and put it somewhere s so I don't want to leave it underneath the downloads so I'm
just going to create a safe path for that and then start extracting the data okay so now let's go and unzip the files
so I'm going to go and extract all of them okay so so now let's go inside it and check the data so here we have three
different data sets the first data set the table project sales dashboards we're going to use it in the last section once
we start building our projects then we have two other data sets the big data sets and the small data sets we're going
to use these two data sets in the whole course so the small data source and the big data source they are very similar so
now you might ask me why do we have two data sets Okay so now let's open both of them and see what do we have inside them
so as you can see we have almost the same tables so customers we have orders products and so on so they are almost
identical and now you might ask me why do we have two data sets well because we have many different types of
calculations and functions for example some calculations going to change the data at the role level and it's better
to have a small data set in order to understand their results easily and in the other hand we have calculations like
aggregations on the table LOD it's better to have many data in order to understand how it works and that's why I
have decided to have two data sets in order to cover all those scenarios and another thing about the data sets is
that the file type is CSV we have only one Json over here so you can use either Tableau public or tblo desktop in order
to follow me in the course all right so now I'm going to walk you through the data model of our
data sets here we have three typical tables our data sets contain information about the superstore use case it is
simply sales transactions of customers ordering products by a company it's classic and very easy to understand the
first table in our data model is the customers table it contains all customer informations such as the name of the
customers their locations and their score in the small data set we have five customers and in the big one we have
around 800 customers and the second table in our data model is the orders it contains all the orders placed by the
customers so we have informations like the order date sales quantity and profits in the small data sets we have
10 orders and in the big data set we have a around 5 years of data and that's really helpful once we start building
clusters and the third table in our data model is the products it contains all the products that we find inside our
super store so we have informations like the product name category and the subcategory in the small data set we
have only five products in the category Monitor and accessories but in the big data sets we have more than 2,000
products with categories and subcategories all right so now we have those three tables but as well we have
relationships between them like for example example there is a relationship between the orders and customers they
can be connected using the customer ID and if you check the orders and products you can find another relationship
between them where you can find the product IDs in both tables and with that we can make a relationship between the
orders and products all right guys so I leftt all those informations in my website you can find there all the links
to the data sets that I found during my research so you can go there and check them if you want
[Music] okay everyone so let's start Tableau public desktop if you don't have it open
already and then in the starting page we're going to go to the left menu to connect TBL our data so click on text
file and now we're going to go and find our file the customer CSV that we just downloaded and now we can see the
customers data inside Tableau so let's move to the worksheets I'm going to click on the orange tab over here sheet
one to create a new worksheet and now we're going to build our visualization in Tableau we have only to drag and drop
so from the left side let's drag and drop the country in the columns and let's get another one let's move the
count to the rows all right so that was it we have our first visz and here you can see in this visual how many
customers we have in each country so with that we are done building the workbook and now it's time to share it
so sadly in tblo public we cannot download it locally at our PC but I'm going to show you work around later so
now the only option that we have is to publish it to our new tblo public account okay so now in order to do that
let's go to to the main menu over here then click on files and then we're going to click on save to Tableau public for
the first time you have to sign in with Tableau public account that we just created all right so now let's click on
sign in and now we have to give it a name and I call it my first viz and once you click save Tableau public desktop
going to start publishing our workbook to Tableau public and once it's done with the publishing a web page can open
automatically directly showing your viz in your public account so here is our viz let's go back now to our home page
and as you can see over here we have our first Vis published to tblo public and let's go inside it again and now
everyone in the world can see your viz interact with it and even download it so let's see how we can download that there
is download icon over here then click on that and now you can select the file format that you want let's select the
last one is Tableau workbook so click on that and then click download and now we will get the Tableau file twbx where we
have our data and our visualizations inside it so if you open it you can see our work again and this is the workr
that we can use in order to save our work locally at our BC in tblo bu now I remember 2014 the first time I
open Tableau I was overwhelmed with all icons and parts that we have in Tableau interface and navigating through Tableau
Pages was very confusing for me at the start and that's why I'm going to take you in short tour in Tableau interface
so let's go okay so now let's go and start Tableau and now the first thing that I want to
show you is that the whole thing the whole file we call it a workbook and the workbook is like any other book it
contains different sheets and the Tableau workbook contain three main Pages we have the start page it is the
main page where you can connect our data to Tableau and then we have the data source page it is the place where you
can connect and combine your tables together and do changes to the metadata like green naming columns and so on and
the third page where you're going to spend most of the time is the workspace page it is the place where you're going
to build your data visualizations all right so now we're going to learn how to navigate through those pages and how to
switch between them okay so once you start Tau you will be in the welcome page the start page
and now if you want to go to data source page we have to connect something so let's go again to the left side over
here connect to text file and then select our file customers and open once we do that we're going to land
automatically in the data source page and now if you want to go back to the start page so in order to do that we're
going to go to this Tableau icon over here on the left side so if we click on that we're going to go back to the start
page and if you want to go back to the data source page we're going to click on the same icon so click on that again and
we are back to the data source page so with this icon we can always go back to the start page of Tableau all right so
now let's see how we can go to the work work space page in order to do that we're going to go to the bottom over
here you will find different tabs the first one is always the data source tab this is exactly where we are now at the
data source but now if we select the sheets tblo going to take us to the workspace page and if you want to go
back to the data source page there is two ways to do that first we can stay at the bottom over here and we can select
the data source tab so by clicking on that we go back to the data source and the second option is that add a data
pane so if you go to the left side over here you can see our data source customers and if you double click on it
we're going to go back to the data source page okay guys so that's was it this is how you can navigate through
Tableau Pages let's have now a quick overview of each page okay so let's start with the first
page the start page we can see here three panes connect open and discover in Connect we can find all different types
of data connectors and in tblo public we have around 10 that's enough for the training but in tblo desktop we have
over 90 data connectors and now in in the middle we have open once you start Tableau for the first time this section
going to be empty but as you start creating new workbooks Tableau going to start showing you the most recently
opened workbook and this is really nice to have quick access to our workbooks here we have only one the first pH that
we published before and in the right side you will find this cover you will find different stuff from Tableau team
like blogs news training tutorials and so on and now in the bottom you can see informations about Tableau Software for
example now it shows that we can upgrade to Tableau desktop or later once Tableau releases new version of Tableau you will
find information here to update your Tableau but since we just installed the most recent version of Tableau it
doesn't show it okay so that was it for the start page let's jump now to the next one we have the data source page
and by now you should know how to go there by clicking on Tableau icon okay so what do we have here in the
data source page on the left side you can find all informations about our data in connections you can find the
connection informations and files you can find all tables that are inside our data and then in the middle we have the
data source name and then over here we have the area where we're going to build our data model and it contains two
layers The Logical layer and the physical layer I'm going to explain that in the next tutorials don't worry about
that and beneath that we have the data Grid it's going to show us a sample of our data and as default it going to show
the first 1,000 rows of data and in the left side we have another grid this is the metadata grid it show us more
details about the tables Fields all right so that's all for now we're going to move now to the next page the
workspace page and we can do that by selecting the sheet tab okay so in the workspace page we're
going to spend most of our time here building our visualizations that's why we have a lot of icons and stuff around
so let me quickly guide you here in this interface okay so we're going to start on the top we have the toolbar it
contains a lot of icons and those icons are the most frequently used functions in tableau so as you are building your
visualizations you have a quick access to those functions and as you might already notice there's some functions
that are not selectable well you have to understand here that in Tableau if something is grayed out that doesn't
mean that this feature is not available in Tableau public but it means it is not relevant for the visual now so for
example if I go over here it's going to sort the visual and since I don't have anything so it's not relevant to sort it
let's check the other icons we have the Tableau icon it's going to take us to the start page you know that already we
have the undo and redo the last action in the visual and as you can see as I'm hovering on the icon Tableau going to
give me short description of the function so here we can create a new data source or over here we can create a
new worksheet and so on so just hover all the icons and you will see the function all right so now let's move to
the left side we have here two panes the data Pane and analytics pane as default table going to show us the data pane but
if you want to go to the analytics pane just simply click on it so you can switch between them by just selecting
them so let's see what do we have here in the data pane the first thing is the data source that contains our data and
below that we can find the tables inside this data source we have currently only one table the customers and we can see
over here the fields or columns inside our tables and here we have as well a search field sometimes our data source
gets really big and we're going to have a lot of fields so this is really nice way to search for specific field okay so
now let's go to the analytics Spain and you can find over here predefined functions that you can add to your
visual like adding a an average line or doing clustering or even you can create your own reference line really nice
stuff okay so now I'm going to switch back to the data Paine all right so now let's move to the middle and you can
find over here different shelves and cards we're going to use them in order to build our visualizations and
everything works here with drag and drop so let's start with the first one the rows and column shelves the visuals of
Tableau they have two Dimensions the rows and columns like any other tables so if you put fields in the column shelf
it's going to create a color of the table while if you put fields in the row shelves it's going to create a row of
the table easy stuff so now let's have an example okay so let's go to the left side and we're going to drag and drop
the countes on the columns and with that we Define The Columns of the visual over here so now we're going to have
something in the rows let's take the counts and drag and drop it on the rows and with that we Define the visuals
columns and rows so if you want to S between them you can go to the toolbars over here and click on this icon and you
can switch between them very easily if you have a lot of columns I'm going to switch back and now we can add more
columns and more rows so for example let's take the city drag and drop it on the columns over here so you can have
multiple stuff and now if you want to remove one of those columns you can do that by drag and drop on the empty space
okay so let's move to the pages shelf you can use it to split the current visual into series of pages if you want
to analyze something like step by step and take it slowly so let's have an example okay so let's take again the
customer count drag and drop it on the pages and now as you can see on the right side we have a new window to
control the pages and now we are at the first page where we have countries with only one customer so if we click over
here on the right side you will get the countries with two customers and so on and now for the next example I'm going
to remove it so I'm just going to drag and drop in the empty space all right so let's move to the next shelf we have the
filters you can use it in order to filter our visual for example let's take the countries drag and drop it in the
filters and now you can here decide which country is going to stay and which country going to leave the visual so now
if I select for example let's remove friendss and click apply you can see our visual don't contain now the country
friendss and now I'm going to remove it again from the shelf by drag and drop in the empty space and then we have the
marks card you can use it in order to design the visual so for example we can add new colors so if we drag and drop
the countries on top of the colors we will get the color for each country or we can change the size of the pars
either make it small or big or we can add labels and so on okay so now let's move to the middle of course here we
have our view it contains visualizations or we call it vises so first we have the title and you can change it by double
click on it let's give it the name for example customers by country and then click okay okay and
below that we have our visualization and it contains different stuff for example we have the headers and here we have the
countries and as well we have the axes now the intersection between those fields are the marks
and those marks could be like bars in this example or could be a line or circles or any other shape and now if we
check the bottom of Tableau interface you can find status bar it contains a lot of details about our visual for
example it says we have three marks of course we have three pars and we have one row and three columns and the total
number of customers is five and now let's add more stuff to the visual to see how those status change so let's
take the scores drag and drop it in the rows and you can see here we have now six marks we have six bars we have two
rows and three columns and those statos are really important once your visualizations get complicated so now we
have very simple one we can count it and see we have six parts but if we have a lot of Dots and a lot of points it's
really hard to count them so it's really nice to check the status bar to see details about our visual all right so
now let's move to the right side and we're going to go to the show me icon so select that now you will get different
visualizations that offers and by just clicking on them you're going to switch the whole visualizations in our view so
here we can switch it to tables or to P chart or to tree maps and so on so now just go and explore those different
visualizations and you might already notice that some of them are grade outs we cannot use it here again it's
available but we don't have the requirements to use it so for example if you go to the line chart here Tableau
tells you what are the requirements or what Tableau needs in order to build this visualization so it needs one date
it doesn't need any dimensions and it need at least one measure and currently in our view table cannot create it
because we don't have any date field in our view all right everyone so that was the main component of the worksheets now
before we go to the dashboard I'm going to do a few stuff you can follow me okay so I'm going to undo those
visualizations and go back to the bar and then I'm going to create a new sheet so I'm going to click over here create a
new worksheet and then I'm going to take the countries and this time I'm going to take the scores
over here and then I'm going to use the byy charts and over here I'm going to put
some labels on it okay so that's enough let's go now to the dashboard we can do that by creating new dashboard on the
icon over here and now we are at the interface of the dashboard I'm not going to explain
everything over here it's just important to understand that in the dashboard we can start combining different sheets in
one place so we can drag and drop the sheet number one where we have the customers by country and then we can
take the sheet number two just place it somewhere over here and then I have in one place two visuals the sheet number
one and sheet number two and this is the main job of the dashboard all right everyone so now I'm going to show you
the last type of sheets we have the story in order to create a new one we're going to go to the bottom over here and
click on this icon and with that we have created a new story and stories in Tableau they are like sequence of
visuals and and we use it usually for presentations if you want to tell a story from our data all right so what do
we have over here in the left side we have the visuals that we created we can see the worksheets and as well the
dashboard and then over here we can add a new story points and in the middle we have in this section like navigator to
go through our story and then here we're going to present the story or the views so what we're going to do now in the
first one we can to drag and drop the dashboard let's do that and now we're going to add a Next Step by adding blank
over here and then we're g to take the sheet number one and then we're going to add a new one blank and then sheet
number two so now we have like story it starts with the big picture with the dashboard and as we go through the story
step by step we go more in details in each visual it's really nice way to present or to tell a story using our
visuals all right so now we have the Tableau Software installed we have the two training data sets the public
account to share your work and everything is ready to start learning Tableau so with that we have finished
this section where we have prepared your environment to practice Tableau and in the next section we will do deep dive in
the Tableau Data source to learn how to build a data model in Tableau by combining
tables data modeling in Tableau each successful dashboard or charts in Tableau going to be based on a solid
data model and having data modeling skills is essential for each Tableau project or business intelligence
projects so that's why we're going to start learning the fundamentals of data modeling including the star schema and
the snow Fleck schema and then I'm going to introduce you to the Tableau Data modeling where you're going to learn the
physical and The Logical layers and then we're going to learn the different methods on how to combine tables in data
modeling using joints Union relationships and data blending and of course in order to understand the
differences between them we're going to compare them side by side and of course I'm going to guide you in when to use
which methods and at the end we're going to go and build two data sources based on our training data sets so let's start
with the first topic where we're going to understand the fundamentals of data modeling so now let's let's
go in real projects your data going to be sted typically in data warehouses or data Lakes inside many many different
tables and the first step in any visualization tools like Tableau or Barbi is to connect those tables and
combine them in one big data model so let's start with the question what is data modeling data modelling is
the process of organizing and representing data in a clear and understandable way each data model has
entities entities could be things like customers and products or events like orders and inside those entities we have
informations and we call them attributes like the first name and the last name inside the entity customers and we
describe in the data model how those entities are connected or related to each others and we call it relationships
this data model this visual representation of the data makes it easier for us and for programs to
understand the data which is really important for making decisions and improving performance of the
business all right so we have three different types of data models at different levels of abstraction first we
have the conceptual data model this type is high level representation of the data model without going in details on how
the data model is implemented it's like a map that shows the important entities and the relationships and we usually use
this type to explain the data models to business analysts and stockholders to understand the big picture of the data
the second type is The Logical data model in this data model we go more in details on how the data is structured
and organized we Define in this model the attributes of each entity and it includes as well constraints and more
details about the relationships between the entities this data model is usually used by database designers and
developers as a blueprint for the implementations and the third type is the physical data model this type
represents the actual implementations of the data model it includes all the technical details about how to store the
data like the data types of the attributes the primary and foreign Keys indexes and so on this data model is
used by developers to create and manage the databases all right so let's summarize the conceptual data model
shows the big picture of the data The Logical data model provide a blueprint for the implementation
and the physical data model shows how the data is implemented in the databases and Tableau did adopt both the logical
and physical data models in the data sources but we don't have conceptual data model in Tableau don't worry about
it I will show you more details later all right so now for analytics and especially for data warehousing and
business intelligence we need special data models that are optimized for queries and for analytics it should be
flexible and easy to understand and for that we have two special data models first one is the star schema star
schema has a central fact table and surrounded by dimensional tables the fact tables contains events and the
dimensions hold descriptive information the relationship between the fact and the dimension tables form a star shape
and that's why we call it a star schema and the other data model we call it snowflake schema it is very similar to
Star schema but the dimensions here are breaking down into subdimension normalized tables or Dimensions means
that those tables are broken down into small pieces to avoid having big tables or big Dimensions which leads to many
data duplications and slow performance the shape of these data models looks like
snowflake so star schema is a simple and easy to understand data model and we usually use it if our data set is small
or medium in the other hand the snowflake schema is more complex but it eliminates the duplicates and reduces
the storage spaces and we usually use it if we have large data sets all right so the data sets that I've prepared for
this Tableau course are using the star schema data model just to keep it simple and easy to
follow all right so our data model has a name and we call it star schema if you're going to work on real projects
you're going to hear about the star schema a lot so star schema has mainly two types of tables facts and dimensions
for example we have the table customers it Des describes each customers by their first name last name country and so on
so customers is a dimension table and we have another dimension table in our data model it is the products so products
table describes as well each product by their name and category so it is as well a dimension all right so now let's talk
about the second type of tables in the star schema we have the facts for example let's have a look at the big
table in the middle we can see three things you can see first a lot of keys to the other dimensions we have the
order ID customer ID product ID and we can see dates so we have the order date the shipping date and the third thing we
can see a lot of numbers so we have sales quantities profits we call them as well measures so if you see those three
things that means we have an event or fact table so facts Connect dimensions together it has dates and as well
measures okay so to summarize how do we decide if a table is dimension or fact if you have a table that contains
informations about a physical person or an object like employee customers product s then this table is a dimension
and usually they are small tables and in the other hand if you have a table that contains events for example we have
sales orders logs ATM transactions so any tabl that has events transactions and has time in it we call it facts and
usually they are really huge tables okay so in our data model in the data sets we have two Dimensions we have the
customers and products and in the middle we have our fact the orders all right so now if you hear in your project someone
talking about star schemas and so on you know exactly what they mean it's very important Concept in analytics and bi
world if you are using Tableau or power Pi okay so once we connect our data to Tableau we have to create a data model
in our data source and if your data contains only one table then your data model is very simple you have single
table in your data model but in real life projects things get more complicated where you have multiple
tables and Tableau here offers four different methods of how to combine and connect your tables we have
relationships joins Union and data blending and now before we start doing deep dive in those four methods let's
first understand the data modeling in Tableau in Tableau Data model we have two layers we have the physical layer
and on top of it we have the logical layer in the physical layer we might have some couple of physical tables and
we can combine them in Tableau using two methods either joint joining the tables or using Union between them and now
let's move to The Logical layer it is the top level layer and provide us like an abstract to hide all the details in
the physical layer this is especially nice if we have a lot of tables in the physical layer so once we are building
our visualizations we don't want to see all those tables in the physical layer so The Logical layer going to provide us
like an abstract or going to hide all those details so the result of merging the tables using join and Union in the
physical layer going to be presented in The Logical layer with single table flat table and we call it a logical table so
that means we're going to have two logical tables the first one going to present three tables after doing the
join and the second one going to present two tables using the union but we still have in data modeling to connect those
two logical tables and in Tableau we have only one method to do that and we call it relationships and it's very
important to understand that in The Logical layer we cannot merge tables in one table so after reconnecting them
using their relationship between the two logical tables the table is going to stay as it is and nothing going to be
merged we just describe the relationship between the two logical tables and now back to those two layers both of the
physical layer and The Logical layer we can find it inside Tableau Data source and as you know on top of the data
source we have our visualizations and you can see in this example only the tables from The Logical layer and you
can start building your visualizations using the data available from The Logical layer but sometimes as you are
working with the projects you build another data source with another data model and here in this example it's
important to understand that not all logical tables comes from the physical tables they could come directly from
your Source system and now in order to build one visualizations from both of the data models and the data sources we
have somehow to connect those two data models or data sources and we can do that in the visualization level where
Tableau offer us the last and very unique method of connecting and combining tables something called Data
blending so by looking at this you can see that will offer us four different methods of how to combine and connect
tables in different layers and different levels so in the physical layer we have the joints and unions we have in the
logical layer the relationships and at the visualization level we have data blending all right so now let's see in
Tableau how we can navigate through the physical and The Logical layer we are currently at the data source page and as
a default we're going to be add The Logical layer in the data model so that means anything that we drag and drop in
our data model going to be considered as a logical table so the customers is a logical table let's take another one
let's take the orders drag and drop it over here so this is our second logical table and as you can see Tableau did
create between them a relationship because at the logical layer we can do only relationships so now we are at The
Logical layer how we can go to the physical layer in order to do that we're going to go inside a logical table so
let's go to the customers and double click on it once we do that we're going to go to the second layer we are are
inside the physical layer now so table going to tell you over here the customers is made of one table because
we have only one physical table so now anything that we drag and drop in the data model going to be considered as a
physical table so for example we can take the customer details let's drag and drop it over here and by default Tableau
going to create between them not relationship it going to create a joint between those two physical tables and of
course we can do a union between them so in the physical layer we can do joins and unions and as you can read over here
it says the customers The Logical table customers is made of two physical tables and if you have her on this icon you
will see exactly that so we have two physical tables defines the logical table customers and now if you want to
go up back to the logical layer we can do that by just closing the physical layer so let's click on that and now you
can see that the customers has a new icon it says in the physical layer there is like join and we get more
informations if we hover on the tables it says logical table customers that is made of two physical tables the
customers and the customers details so that means the data in The Logical tables comes from the physical layer but
if we go to the orders over here you will see no physical tables the data comes directly from the original tables
and with that we have learned how to navigate through the physical and The Logical all right so let's start talking
about joining tables we usually have two tables table a and table B and if you want to combine them in one big table
then then we can use join between them the first thing to understand is that once we use joint between two tables
then we have two sides table a going to be the LIF table and table B going to be the right table so now what going to
happen after we join the tables all the fields from the left table will be at the output and then all the fields from
the right table will be added next to it so joins combines the fields or The Columns of two tables so now in order to
do joints we need two things first we need the key field it is a field that you can find it in both St tabls and
after that we have to define the type of joint and we have to choose between four different types of joints we have the
inner join the left join right join and full join and if you know SQL then you know those types it's exactly the same
logic but let's have a quick examples to understand the four types of joints all right so now we have this
example where we have two simple tables we have the customers names and the customer's age and we want to combine
them in one table because it makes no sense to have two tables about the customers so we want to make one
customer table and we want to combine them in the first table we have the ID and the names and the second table we
have as well the IDS and the age so it's really easy the key for this joint is the customer ID now let's see the
different output using those different types of joints so let's start with the first type of joint the inner joint
inner joint says the output going to show only the matching rows from the left and from the right so that means
any unmatching rows will not be presented at the output so let's see how this works so the first thing that's
going to happen is that we're going to combine first the fields so first we're going to start with the left
side and then the right side and now we're going to start matching the rows we're going to start from the left side
do we have the user ID one in the right side as well so we have a match so in both tables we have the customer ID one
so this we're going to see it at the output and then we proceed on the left side do we have customer ID number two
as well on the right side you see we don't have it we have only the customer number three that means two is not
matching on the right side and as well the customer three is not matching on the left side so that was it if you use
inner join in this example you will get only the customer ID number one since we find it in both tables okay so let's go
to the next one we have the left join left join says we going to have everything from the left table without
checking anything but from the right table we're going to have only the matching rows so if we do left joint
between those two tables we're going to have the following output so first we're going to have the fields from the left
table and the fields from the right table near each other and then we going to have all the customers from the left
table without checking anything so everything going to be presented over here those two customers and then from
the right side we going to have only the matching rows so that means do we have the customer ID number one on the right
table yes we have it then we're going to have it at the output but the customer ID number two we don't have it at the
right table which means it's going to be empty and empty means nulls so here we going to have the values of nulls in
both of the field ID and as well in the age and that's it this is the output of left join all right so now we're going
to move to the next one we have the right join you might already understand how it works so we're going to have all
the RADS from the right table and only the matching draws from the left table so let's see how the output going to be
if we do right joint between those two tables as usual we're going to have all the fields from the left all the fields
from the right and we're going to have all the rows from the right table without checking anything so we're going
to have those two customers and then we start matching from the left side so do we have the customer number one yes we
have it so we're going to add it over here do we have the customer number three so as you can see we have only the
two that means we don't have informations and we going to have the nulls so those going to be empty
and that's it so it is exactly the opposite of the LIF join and now to the final type of join we have the full join
full join means everything from left and everything from right without missing anything so let's see what going to
happen if we have full joint between those two tables so as usual we start with the fields so from the left and
from the right and then we take everything from the left side so we take those two customers over here and from
the right side we're going to have the matching Row for those two customers so so for the ID number one we have this
one but for the two we don't have any matching rows so we're going to have nulls over
here but as you see we don't have everything from the right side so the customer ID number three is missing so
that's why using full join we're going to have those informations over here and then we're going to match it as well
from the left side so do we have any customer number three on the left side we don't have so that means we're going
to have NS as well so now by checking the output you can see we have everything all the data from left all
the data from right and where there is no match we're gonna have nulls so as you can see you need to be really
careful with the type of joint you are using because using the wrong one this could cause of losing data and if you
want to be safe and you don't want to lose any data then you have to use the full joint but sadly full joints are
very slow and you're going to end up having very big tables especially if both tables have a lot of unmatching
rows and now I want you to understand how joints Works in Tableau and what can happen in the background Once We join
tables so we have the data source we have the visualizations and inside the data source we have the physical layer
and The Logical layer in the physical layer we're going to join both of the tables A and B and once we do that tblo
going to create one new combined table A and B in The Logical layer this table we call it a logical table which contains
data from both tables and then in the visualization layer let's say we want to select select the fields of F2 and F4 so
Tableau going to query the data source and the data source going to get the data from the new combined logical table
ab and then send the data back to the visualizations so as you can see the interaction between the visualizations
and the data source going to be at The Logical layer so the physical layer going to be completely out of the
picture and that's simply how joints Works in Tableau all right so now how we can do
joints in Tableau let's say that we want to join the table customers with the orders so first we're going to go to the
left side over here drag and drop the customers and the joint is going to be done at the physical layer so we have to
go there so let's go inside the customers and now we are at the physical layer and we're going to take the orders
and just drag and drop it over here at the empty space and with that Tableau as default going to create an inner join
between the customers and the orders and if we want to customize the join we going to go over here at the icon and
click on it and we have here two things to do first we're going to define the type of join as we learned we have the
inner left right and full outter join you can just click between them and see which data going to be missing and which
data can to be presented as the example that I showed you so I'm going to stay with the inner join and the next thing
is that we're going to define the key for the join so tblo did understood there is customer ID from the left there
is customer ID on the right and this is the perfect match which is correct but let's say it was wrong and you want to
choose the correct key for the join what you're going to do you're going to go to the left side over here click on the
Arrow you will get all the fields from the left table and select the correct one in this example the customer ID is
correct so I'm going to stay with it and you'll go to the right side you have as well the same icon over here and you
will get all the fields from the right table and you select the one that suits you and one more thing your key for the
joint could be not only one field it could be multiple Fields so you can add more Fields over here so you go to the
next row and select the next field for the join but in this example we have only one key so I'm going to close this
we have set up the joints we going to stay with the inner join and we can go back to the logical data model and as
you can see the table over here has the icon of join it tell us that this logical tables is a result of joining
two tables and that's it this is how you can do joins in Tableau all right so that's all for joints next we will learn
the second methods how to combine tables using Union [Music]
[Music] all right so now let's talk about Union let's say that we have two tables and
both of them has exactly the same columns sometimes it makes sense to combine them in one big table and we can
do that using the union so once we do Union what's going to happen The Columns and the rows of the left table going to
be presented at the output and from the right table only the row is going to be append at the output beneath the first
one so Union going to combine the rows of two tables and in order to do the union correctly we have two requirements
first both of the tables should have exactly the same number of fields and second the field should have exactly the
same data types so as you can see we don't need a key between those two tables it's not like the
join all right so now let's have a quick and very simple example about the union we have here very simple two tables the
orders of 2022 the orders of 2023 and as you can see both of the tables has exactly the same structure so we have
two columns the ID and date in both tables and it makes sense to merge them in one table we call it orders so if we
do Union between them what can to happen at the output it's going to start from the left table and it going to take the
fields first so the ID and date and then it's going to take all the rows from the left side and put it at the results and
now from the right table we will not take again the fields because we have it already from the lift table it's going
to take only the rows and abundant at the end of the table so it's going to take the two orders three and four and
just put it beneath the table over here and that's it it's very simple and easy it just need exactly the same number of
columns or fields and exactly the same data types all right so now let's understand
how Union Works in Tableau and what's going to happen in the background once we do Union so we have here again our
layers and Union is very similar to join in the physical layer we have our tables A and B and once we do Union between
them Tableau going to create a new combined logical table where it going to combin the rows of both tables and then
in the visualization level let's say that we take the field F1 tblo going to send a query to the data source and data
source going to ask The Logical table to get the data and once Tableau get the data from the data source it's going to
present it as the visualization and as you see again here the interaction is between the visualizations and The
Logical layer all right so now let's see how we can do Union in Tableau we're going to work
with the two tables orders and orders archieves both of them has exactly the same number of fails and as well exactly
the same data types so in order to do that we're going to take the orders drag and drop it on the logical layer but you
know we can do Union only in the physical layer so we have to go inside the orders double click on it and now we
are at the physical layer let's take the second table the orders archieve but now instead of dropping it at the white
space because tblo then going to create a joint we don't want to do that we want to create a union just drag and drop it
beneath the table and as you can see table going to say drag table to do Union so if we just place it beneath it
tblo going to do Union between those two tables and as you can see there is two lines gray lines indicates that there is
Union and if you want to check that you can check at the result over here the data we will get a new field called
table name and you see some records comes from the orders and other records comes from from the orders archieves
which indicates that we have one combined table of both of the orders and the orders archieve let's go back to the
logical layer so I'm going to press here the X and as you can see we have a new icon over here it indicates that we have
a union and as you can see the tool tipe of Tableau it explains everything so we have a logical table called orders it is
the result of Union table orders and orders archieve this is one way of doing Union between two tables in Tableau
there is another way to do that so let me show you how to do it first I'm just going to move it drag and drop it
somewhere over here and as you can see on the left side we have something called New Union so double click on it
and you can see we have here two options the manual and as well the automatic the manual we're going to get the result
exactly like we just did so what we can do we can just drag and drop the tables over here the orders and the orders
archieve and then click okay with that we get exactly the same results without going to the physical layer and drag and
drop two tables and put it exactly underneath the table so this is nice way to do Union between two tables you can
check that by just going to the physical layer so double click on it and as you can see we got exactly the same results
and here we can check the table name we have orders and we have the orders archieved all right so now let's check
the second option where we can do Union automatically I will go back to the logical layer and just remove the union
over here let's start a new one from the scratch and now we're going to go to the automatic so what do we have over here
imagine that we have around 100 tables about the orders and this is very if you are not working with databases you are
working with files and the files has limitations so what we're going to do we're going to go and split the files
after day after months after year and so on so we end up having a lot of files and it is very painful if we're going to
go and drag and drop all those files in Tableau to do Union and instead of that we're going to Define for Tableau or
Rule and Tableau going to go and search for all files that follow the rule and do Union between them so what that means
for example we have here two tables the orders and the orders are she what is the naming convention over here it both
of them starts with the orders so I could have like a third table called orders uncore 2022 orders uncore 2023
and so on so there is a rule I'm following here in my naming convention and I can specify that in Tableau so
let's see how we can do that so over here the first option is going to include or exclude I'm going to leave it
as include and now I'm going to specify the rule so it start exactly with orders and after this word it doesn't matter
what comes after that it could be underscore 2022 2023 or nothing and so on so anything after that doesn't matter
so what we're going to specify after that a star Stars means anything after orders and then we have some options to
tell Tableau where exactly to search either at the sub folders or at the parent folders I'm going to leave it as
it is and then click okay so now we have a union let's see what tblo going to say says we have a logical table called
Union and it says we have many Union table because we have the automatic way of doing that and now let's check
whether Tableau did that correct so as you go to the right side here in the overview you find we have a new field
called path it is the path of the files so let's see that I'm going to go to the sheet one here and just drag and drop
the pass to see just the files so as you can see tblo did it correctly we have the orders archieve and the orders it's
really nice way if you have a lot of csvs and excels to do it automatically instead of drag and drop all those
tables usually in my projects I never use this because all the data is prepared in the data warehouses or in
the data lake so with that we have learned all the different options on how we can do Union in
t all right so now let's talk about relationships in 2020 tblo introduced a new methods on how to combine and
connect tables together and they called it relationships they made it even as a default methods on how to connect tables
since it is very fast and flexible so what is relationship ships and how it works in Tableau it is
completely different than joins and Union if we have in the logical Layer Two logical tables A and B we can
connect them at this layer using the relationships think of the relationships as a contract between two tables and
when Tableau uses the data from those tables it has first to check the contract in order to understand how to
generate the queries and now it's very important to understand that once we connect the tables using relationships
the tables can stay separated from each others and Tableau will not create a new logical table so everything going to
stay as it is without any changes and here we just describe the relationships between two tables so now in the
visualization level if we take the field F1 from table a and F4 from table B what can to happen first Tableau going to
check the contract in order to understand how to generate the queries and then it going to send the query to
the first table and then it going to send another query to the table B in order to get the data for F4 and then
the data going to be combined at the visual I ization level and not the logical
level all right so now let's see how we can create relationships in Tableau it's really easy so we're going to stay at
the data source page and as well at The Logical layer we will not go to the physical layer and all what we need is
two tables so let's take the orders drag and drop it over here in the data model and then let's take the customers so now
as you can see as a moving there is like a noodle or relationships so let's drag it here and tblo going to automatically
create create relationships between the orders and the customers and now how we're going to configure and set up the
relationship so let's go to the Noodle over here and just click on it and then there will be no new window or something
for the setup we're going to go to the metadata over here if you don't see the information like this then you can go
over here and you will see like the relationships and The Logical tables so make sure you are selecting the
relationship and there is like three things that we're going to set up as a relationship first it's going to be the
key it's like the join key it is Comon filled between between the two tables so now as you can see over here from the
left table we have the customer ID and the right table we have the customer ID and tblo did automatically understand
that this field could be used as a key which is correct but if you want to change it you can go over here so we
will get a list of all fields on the left table and as well you're going to go over here you will get all the fields
from the right table and you can add more fields for the key currently it is correct so I'm going to leave it as it
is and next we're going to go to the performance options so we're going to extend the performance options over here
and we have here two things we have the cardinality and the integrity and if you leave it here as it is as a default
nothing going to go wrong you will not lose any data so you don't have to change anything here unless you want to
optimize the performance so what do we have over here we have cardinality as many or one on the left side and on the
right side you can Define the same stuff for the Integrity we have some record match and or records MKS so in order to
understand those stuff let's have an example all right so now we can to have example
for the cardinality in relationships we have two tables our orders and customers there is a relationships between them
and the key for the relationships is the customer ID and in the cardinalities there is two options either we're going
to use many or one and in order to decide which one is the correct one we have to do data profiling data profiling
means we're going to do deep Dives in the data to understand the values inside our tables and once we do data profiling
it's very easy to select whether it's many or one so now what those values means many and one there is a simple
rule for that we use many if there is duplicates in the key and we use one if the key is unique and does not have any
duplicate inside it so now let's check the example in order to determine whether it is many or one so let's go to
the orders over here and the customer ID you see in those values there is delates we have the customer ID once here and
once here as well and the customer ID two is twice so those values are not unique and contains duplicates that's
why we call it a manyu let's go to the customers over here you can see we have the customer 1 2 3 and that's it so
those values are unique and there is no duplicates inside it we don't have the customer ID one again in the table so
that means we can specify here a one so now let's go through all scenarios in order to understand what can to happen
in Tableau once you configure this all right so now let's run the first scenario where tblo going to Define it
as a default many to many relationship so we have at the left side M and on the right side we have as well
money and let's say in the visualization level we talk the customer IDs from the order and the sum of all sales and then
the name of the customer all right so now let's see how Tableau going to work Tableau first going to check the
relationships it's going to say okay it's many to many it's better to check the whole tables on the left and on the
right so we're going to start on the left side we have the customer one it's going to take it over here and it's
going to sum all the sales so since it's many table going to understand I have to check the whole table so tblo going to
scan the whole table one by one it's going to say okay we have the sales 50 the next one is not the customer one and
then go to the next it's going to skip it and then we have again the customer ID number one and it's going to do the
sum between 50 and 30 that means we're going to have the value of 80 it is the sum of the two sales and now we're going
to go to the right side to find the name of the customers it's going to check okay it is many so it's going to scan
the whole table for the customer ID one so now the first three Cod it finds okay we have the customer ID one it's going
to take Maria over here but now tblo will not stop it's going to scan the whole table since in the relationships
it's many but it doesn't make sense because the customer ID here is unique so tblo going to check whether there is
customer ID one over here and then go to the next and then it didn't find anything so it going to stay like this
and now tblo going to proceed with the next customer we have the customer ID number two we're going to have it at the
output and then we're going to have the sum of all sales so tblo going to scan the whole orders in order to do the sum
so we have over here the 20 and then we have here 10 so the sum of that is 30 TBL going to have at the output 30 so
that's it for the left table we're going to go to the right table T going to scan the recorde one by one so the first one
is not the customer ID number two we have here a match so John going to be at the output tblo going to scan the whole
table so it's going to go for the three and so on and as you can see the output is correct using the default methods of
many to many but we have a problem with that on the right table tblo is doing a full scan so with that we are losing
performance on the right side so it's better to optimize it where we going to tell Tableau if you find a customer then
that's it you don't have to scan the whole table because we have at the maximum one record of each customers
there is no duplicates and it is unique and now we have to tell somehow this information for Tableau in order to do
that we can do it in the cardinality so in the left side it's going to stay as many but on the right side we're going
to say it is one and with that t going to understand okay it is unique we don't have to scan the whole table and we're
going to win a lot of performance all right so now let's see how tblo going to work once we have it as many to one on
the left side nothing going to change because we have many so tblo going to scan the whole table so for the customer
one the result going to be the same but now on the right side things going to be changed so Tableau going to say okay
customer ID number one there is a match it's going to take Maria as the output but now Tableau going to stop Tableau
will not search for the customer ID one and scan the whole table so with that tblo will not be doing any unnecessary
Stu off and we're going to win some performance we're going to go now to the customer number two over here same
information so it t get a scan so do we have the customer number two over here no so we jump to the next one yes we
have a match we're going to take John but tblo going to stop as well and will not scan the next record so as you can
see we have exactly the same output whether you are using many to many or many to one with many to one we have won
the performance with Tableau going to stop the scan on the right side all right so now let's jump to the next
scenario where we're going to do do something wrong where we're going to say okay the customer ID on the left side is
unique and we're going to put the value of one and on the right side it doesn't matter let's have money for example so
now we are telling Tableau on the left side the customer ID is unique so you don't have to scan the whole table and
we're going to have the same example over here so let's see what going to happen on the left side tblo going to
start with the first customer say Okay customer ID one the sum of sales is now 50 because I don't have to scan the
whole table so it's going to stop at the first records and the output going to be 50 so now on the right side once we are
saying many here doesn't matter the result we going to be correct we're going to have Maria but table going to
scan the whole table so the performance going to be bad now we're going to jump to the next customer we have the
customer number two so table going to have it at the output and here again the same problem table going to say okay we
have the sale 20 the customer ID is unique we will not find it again in the same table I don't have to scan the
whole table so tblo going to take the value 20 and going to put it at the output without checking the other values
and here on the right side it doesn't matter we have John which is correct but it's going to scan the whole table so as
you can see if you make mistake here in the cardinalities you might have some problems at the output where we're going
to have some missing data and wrong informations all right so now let's run the last scenario where we have on the
left side one and on the right side as well one we're going to get exactly the same output because we have it wrong on
the left side the only good thing here is that on the right side Tableau going to stop the scan once once it find a
match so it will not scan the whole table so at the output we're going to get exactly the same informations and
here we have one to one all right so now let's quickly summarize on the left side we have two criteria the correctness and
the performance correctness is always way more important than the performance let's start with the first scenario we
have many too many relationships as you can see the output was correct but the performance was bad since tblo doing
unnecessary Full Table scan on the right side so that's why I'm going to give it okay for the correctness and not okay
for the performance for the next scenario we have many to one relationship the output was okay so it
was correct we're going to give it okay and the performance was okay since Tableau stops the scans once it find a
match so that's why we're going to win a lot of performance and we're going to give it an okay let's jump to the third
one we have one too many relationships as you can see the output was not okay it was not correct we are missing data
so we're going to give it not correct and the performance was bad because on the right side we are doing unnecessary
scans so that means it was the worst scenario over here and then the last one we have one to one relationship the
output was not correct not okay but the performance was okay since on the right side we are not doing any unnecessary
scans but to be honest correctness is way more important than the performance and that's why Tableau always recommend
to stay at many to many relationships if you are not sure because you always going to get correct answers at the
output but if your data is Big you will get some bad performance so if you want to have like good performance you have
to invest time in analyzing your data doing data profiling to understand is it many is it one and then change it but
you have to be sure about your data otherwise you will get wrong informations at your visualizations and
that's really bad so that means for this example the safe way to do it to stay at many to many relationships but the
professional one is to have many to one relationships to get good performance but this is not always a scenario just
imagine we switch the tables between customers and orders so customers is left and orders is right then one to
relationships going to be the correct one so be careful here with the sides all right everyone so now let's
understand the Integrity options in Tableau each relationship has two sides the left table and the right table when
we are changing the settings of the Integrity we limit which joints can happen in the visualization so here we
have two options some record match and or record match and with that we have four scenarios first we can choose some
record match in both left and right tables and if we do that then all types of joints are possible in the
visualization we have inner left right and full joint but now if we choose all record match on the left and some record
match on the right so what going to happen now we are limiting the types of joints to only two types inner and right
joint and the next one is going to be the opposite so we have some record match on the left and all record match
on the right what can happen again here we limit the types of joints to only two types the inner and left join and in the
last scenario if we choose all record match on both sides the left and the right then here we limit Tableau to only
one type of join the inner join so as you can see it's very similar to joints we are just defining how Tableau should
work when we use some record match we allow more types of joints and when we use the option or record match then we
are limiting Tableau with the types of joint and here it's very important to understand that we have a tradeoff if
you use or record match and go down this path you will likely experience better performance but you will increase the
risk of losing data but if you choose to use some record match and you go up you will ensure the completeness and the
flexibility but you are sacrificing some resources and performance and tblo team here decided to go with the first
scenario where you have on the left and the right some record match and I can understand that because it's more
important to have completeness and flexibility more than performance let's a look at our data so here we have
customers that didn't order anything so the customer number three didn't order anything over here and we don't have a
match of it so we can say some records matches like the one and two are matching on the left sides but some
other records does not match so we don't have an order from the customer ID number three so that means in our
database we could have customers in the customer table that didn't order anything so the correct option over here
is is some records matches now let's analyze the orders as you can see we have the customer ID number one we find
it in the customers two as well and so on so we can see that all the records or all the customers IDs in the orders has
a match from the customers well that means we can select all records match we don't have for example customer ID 4
over here which does not have a match on the right side so that means in our database all orders should comes from
our customers and we should not have any order without a known customer so after the analyzis we can say on the left
sides on the orders we have always a matching record so we're going to select all records matches but on the right
side we might have customers that didn't order anything then we can say some records matches if we do it like this we
can prevent Tableau from doing any extra stuff by analyzing the nulls like in SQL if you have full outer join you will get
like huge amount of data and sometimes if you're using inner joint or left joint or so on you will get better
performance so if you know exactly what is going on in your data then select the correct Integrity otherwise just leave
it as a default some records matches on the left and on the right you will be safe you will get correct
answers all right so now back to Tableau relationships are really easy we just have to drag those two tables and T look
going create relationships between them just get the key key between the relationships correct and everything
going to be fine and leave those stuff as a default but if you want to be like more professional and get better
performance in Tableau you have to do data profiling and then select the correct one if you are 100% sure so in
this example the orders over here has many in the customer IDs but we have on the right side one for the customers and
then for the Integrity on the orders all records matches because all orders has a customer ID in the customers table but
we might have some customers that didn't order anything so I'm going to leave it as some record matches and that's it
that is relationships in all right so now let's talk about data blending in Tableau but first some
coffee let's go all right so now let's have this example where we have in the data source table a and now in the
visualization level we want to use the data from the field F1 and you know by now tblo going to send a query to the
data Source in order to get the data of the F1 from the table to show it in the visualization and now since this data
source was the first one to be queried and to be used and Tableau going to call it a primary data source and in Tableau
anything is primary going to get the blue color that's why you will see like blue icon indicates that this data
source is a primary one and now sometimes you are in situation where we want to get the data from another data
source for example we have another data source with the table B and we want add the visualizations to show the data of
if F4 so what's going to happen tblo going to send another query to the second data source in order to get the
data of f4 and then the data can to be forward to the visualizations and here Tableau going to call this data source
as a secondary data source and it will mark it with an orange icon and now in order for this to work where we're going
to get data from two different data sources we have somehow to connect them and here exactly we're going to use the
very unique way in Tableau where we can connect data sources together using the data blending and data blending can only
be done at the visualization level on the worksheet page not in the data source so now you might ask how Tableau
is joining those tables at the visualization level well Tableau is using a LIF joint we cannot change that
sadly it is fixed since it's like a LIF joint tblo going to get all the data from the primary data source and only
the matching records from the secondary data source so now to summarize data blending is the methods of combining
data at the visualization levels from two different data sources using a LIF join and this is very unique feature in
Tableau you don't find it in any other bi tool like Microsoft powerbi you cannot for example there combine data
from two different published data sets all right so now let's see how we can do data blending in Tableau and for
this we need two data sources the first one going to be from the CSV files that we have from the small data sets so we
going to go to the text files and let's take the products over here so this is our first data source and now let's go
and create the second data source in order to do that you can go to this icon over here and then click on new data
source so let's go there it's going to be from the Json file that I prepared for you so let's go to Json and we have
the product prices so let's open that since it's Json we have to select the schema so let's go to the data over here
and click yes and then click okay so now we have two data sources in order to switch between them we go again to this
icon over here and you can see we you have now two data sources and by just selecting the data source you will
switch to it and now in order to do the data blending and to connect those two data sources we cannot do it at the data
source page we have to go to the visualization level to the worksheet page so let's do that I'm going to go to
the sheet one over here and as you can see at the data pane on the left sides we have two data sources and by just
clicking on them you can switch in order to see the tables inside them so now we have to decide which data source is the
primary and which one is the secondary for this example I will say that the product is the primary one and how we
going to do that by just using the data in the visualizations as the first data source so I'm just going to take the
product ID drag and drop it on the rows and immediately tblo going to understand okay this is the primary data source and
it's going to mark it with a blue icon over here indicating that this is our primary data source we still don't have
a secondary data source so you see there's no orange icon over here because in our view we have data only from one
data source so now in order to get the data from the second data source we we're going to switch to the product
prices and you can see Tableau immediately turn this data source as a secondary data source so you can see
over here we have the orange icon indicating that this is secondary data source and any field that we are using
it's going to mark it with orange so you can see over here the price it has an orange icon so that's it it's very
simple so now let's say that the product ID is not the key of order to join those two data sources you want to change that
in order to do that we're going to go to the data over here in the menu and then go to the edit blend relationship let's
click on that so we'll get a new window over here and here we have two options automatic and custom if you leave it as
automatic tblo going to figure out which key to join those data sources and here in this example is the product ID but if
you want to change that you can go to the custom over here it's like join you have to specify from the left and from
the right which fields are the key in order to do the join so if you want to change that just double click on it and
then you have in the left side the primary data source and the right side the secondary data source and then you
select the fields that are the key before the join so I'm going to leave it as it is and let's add another key so I
will go over here and add for example the category is from the left side and from the right side the data index which
is really wrong so let's click okay and then again okay you will see on the left side now we have another chain on the
data index and you can see it's like broken chain so that means it is not yet used in the join if you want to activate
it just click on it and you will see we have an active chain and now as you can see the result is wrong because it
doesn't make sense to use this key but I just want to show you how you can deactivate and activate the key of the
joint between two data sources by just clicking on them so now let's just correct this I want to have only the
product ID as the key for the joint so that means I'm going to deactivate the data index over here and that's it this
is how you can Define the key for the data blending and now one thing that is very important to understand is that
everything that we done in the data blending is only relevant for this worksheet so if I go to another
worksheet let's go over here and create a new one and now as you can see over here it's completely resets the two data
source we have it again but we don't have it as primary and secondary data sources that means in each worksheets we
can make a new decision so at the sheet number one the product what the primary I can change my mind here where I can
say okay the product prices now is the primary data source so if I take anything over here you can see product
prices is the primary and if I go to the product and let's say I'm going to take the product name over here products
going to be the secondary so I just switched between them depending on the requirements so if we go back to the
sheet number one we see that the product is the primary but if we go to the sheet number two the product price is now is
the primary this is really nice because it give us really flexibility where we can decide in each worksheet which one
is the primary and which one is the secondary depending on our requirements so data blending is very unique and
great way on how to connect and combine thata all right so now what is the main difference between joins and unions both
of them are very similar they're going to combine two tables in one big table but the difference here is that's how
the data going to be combined in joints the fields of both tables going to be combined so we're going to take all the
fields from the left side and beside it all the fields from the right sides so the results we're going to get one big
wild table but in the other hand in the unions two tables going to be combined but instead of combining the fields here
we're going to combine the rows of both tables so we will get all the rows from the first table and beneath it all the
rows from the right table but both of them has exactly the same columns so joints combines the fields and Union
combines the rows all right so that was the main difference between joint and Union all right so now the question is
what is the main difference between joints and data blending data blending is like a LIF joint but the main
difference here is that when the aggregation is going to be performed in joints the data going to combines first
and then the aggregation going to happen but and data blending is exactly the opposite the aggregation going to happen
first and then the data going to be combined so now let's have a simple example in order to understand what this
means okay so again we have our tables customers and orders first we're going to do the lift join and afterward we're
going to do the data lending between them in order to understand the differences between them in the output
all right so now we're going to start with the left join you know left joint all the data from the left sides and
only the matching on the right side so we start as usual by combining the fields from left the fields from right
and we start recode by recod so we're going to take the customer number one and we're going to search for the
matches we have two rows on the orders so that means Maria going to be twice in the output because there is two orders
and then we're going to go to the next one customer ID number two we have only one order for that we're going to have
it at the output and George don't have any orders so that means we're going to have nulls null here here and here so as
you can see with the lift joint first we combine the data the row data without doing any aggregations and afterward in
the visualizations we can find for example the sum of sales or the average and so on and now let's check the data
blending how it works all right so now let's say we have all the fields from the primary data source and beside it
all the fields from the secondary data source and this is like left join we're going to take all the data from the
primary data source so we're going to get all the three customers over here but the main difference here is that
there will be no duplicates as you can see we have here Maria twice but in data blending you will not get any delates
and now here comes the difference before we start getting the data from the orders from the secondary data source an
aggregation can to happen so for example with the customer ID number one we have two rows the two rows will not be
presented at the output first it's going to be like an aggregation and now it's very important to understand that the
fields in Tableau are splitted between dimensions and measures in the next tutorials I'm going to explain that in
details but now the measures can be aggregated the dimensions will not be be aggregated so for example the customer
ID it is not measure it is a dimension so Tableau cannot aggregate it but since we have it twice the same value tblo
going to write here one and then the next one we have the sales it is measur so tblo going to aggregate first and
then combine it so the sum of that going to be 80 so let's do that and the next one we have the date so here it is a
dimension cannot be like aggregated and since we have two different values tblo going to write at the output star and
since tblo going to provide at the output only one value and we have here two values tblo will not decide which
one of them going to be so tblo can to adds a star so what going to happen and the output going to be star I know this
is really not nice but this is how data blending works so as you can see Tableau always try to aggregate the data before
combine it now let's move to the next customer we have John and in the orders we have only one records that's means
nothing going to be aggregated the output going to be exactly the same and then for the customer charge there is no
information over here we will get as well nulls and this is the output of data blending and this is exactly what I
mean with the main differences between joints and blending is when we do the aggregations so in the left joint as you
can see first we combine the row data togethers and afterward we can do aggregations in the visualizations but
in data blending first the data should be aggregated especially from the secondary data source and afterwards the
data going to be combined in tableau [Music] all right so now what are the main
differences between joints and relationships if you are using joints things going to get really static and we
might lose as well a lot of data but if we are using relationships in our data model then we will get more flexibility
and we will not lose any data and now in order to understand this let's check this example where I have prepared two
data sources one with joints and the other with relationships the first one with the orders if I go to the physical
layer you can see we have a lift joint between orders and customers and let's check the second one we have the
relationships we have as well the same tables we have orders and customers and between them there is a relationship and
now if we check our data we can find that there is five customers and in the orders there is only four customers that
did order so if you check over here the customer ID you will not find the ID number five so that means this customer
didn't order anything this is no problem for the relationships but if you go to the joins over here and you check the
data you will see that we don't have a customer ID number five at all in our data so you can check okay we have 1 2 3
four and so on so the customer ID number five is completely disappeared and that's because we have a lift joint
between the orders and the customers so only the matching RADS from the right side is going to be presented at the
final table so that means we lost this customer and if we are at the visualizations let's go over here and
let's say we want to count how many customers do we have in our database so let's drag and drop the customer ID and
let's turn it to measure of count distinct so our data says okay we have four customers if we go to the
relationships let's open another one and switch to the relationships and let's take the customer ID again over here
switch it to a measure and count distinct you will see we didn't lose the data we have five customers in our
database and the relationship is going to give us more correct answers and now you might say okay we can fix this if we
change the type of join so that's right if I go to the data source and then I go to the
joins go to the orders and I just switch this to the right so that mean we going to get all the data from customers and
only matching from the orders let's close this and go back to our sheet number one you will see let me close
this we'll see that we have five customers so with that we have correct answer as well as with the join and here
we come to the next point that things are really not flexible so that means if I'm building visualizations where
sometimes I'm asking how many customers do we have or how how many orders do we have I cannot each time go to the data
source and change the type of joint because once I decide it's lift joint it's going to stay for all the
worksheets as a lift join unless I'm doing full outer join between the two tables and if you are working with big
tables then you will get a very big mer table which going to slows everything down and this is exactly what I mean if
you are using joins you will lose data if you are using left joint or right joint and as well things are really
static with the relationships if we go to the sheet number two here things are more fle ibles because we didn't merge
anything the data stay separated from each others we just describe the relationships between them so if in
worksheets I'm doing analyzes about the customers it will not affect the next visualizations if I'm doing analyzis
about the orders because we didn't lose any data and I don't have to worry do we have left joint or right joint should we
change it and so on so it's more flexible and we will get always correct answers so that's why joints are static
and you might lose data but relationships are more flexible and you will not lose any
data all right guys so there's another issue with the joints if you compare to the relationships sometimes in joints we
might get wrong answers if we are doing calculations on the measures so let's take this example on the customer tables
we have the score so for each customers we have a score and we have those five customers the average of this score is
going to be 625 and now let's sck in tblo the results from joints and relationships all right so now we are at
the relationships and let's take the score and and drop it over here on the text and then let's find the average so
we're going to go over here measures and the average so in relationships we got the correct answer we have 625 and now
let's check the joins we are at the data source of joins I'm going to take the score drag and drop it on the text and
now we're going to switch as well to average and here we got the wrong result 585 so what happened here well the
answer for that is sometime if we merge two tables together we might get duplicates so let's check the data if
you go to the data source I again in the joins if you go to the score we will have duplicates because
some customers have more than one order and that going to result in a lot of duplicates if we merge the customers and
orders and if you do the average you will get the wrong answer as we saw in the results and if we switch to the
relationships and we go to the customers we see at the score over here on the right side there is no duplicates and we
will get the correct answer and that's going to guarantee for us that using relationships we will get correct
answers if you are doing calculations and that's way better than having duplicate in our data we might never get
correct answers from joints and that's why Tableau introduced in 2022 relationships just to fix all those
problems with the joints and they made it as the default method on how to connect
tables all right guys so now we're going to go and compare the four methods on how to combine data in Tableau unions
joints relationships and data blending side by side so let's go the first point is in which page in which layer we can
use the method now both Union and Joints we can create them at the data source page in the physical layer and as well
the relationship we can use it at the data source page but in The Logical layer and finally the data blending
could be used at the visualization level in the worksheet page and the next Point can we use the method in order to
connect tables from different data sources well for Union joints and relationships we cannot do that it
should be done in the same data source but only the data blending could be used in in order to connect tables from
different data sources the next point is after using the methods are the tables going to be merged in unions and Joints
they going to merage the tables and they going to create completely new tables but if you are using relationships and
data blending they will not create anything the next point is about the flexibility if you are going to use
unions and Joints the decisions that you are making at the data source going to affect all the worksheets and the
visualizations but if you are using relationships and data blending you have way more flexibility for example in the
data blending you can decide in each worksheet page now if you are talking about the joint types in joints we have
inner left right and full in the relationships we can have as well exactly the same behavior as joints but
in data blending it is fixed we have only left join and the next point if you ask me to rank these methods I would say
and tblo as well going to say always use relationships and after that comes the data blending it is a really great way
on how to combine tables from different data sources and the flexibility that we have and then the third one I'm going to
say the joins I would not trank Union because it's completely different than the methods of joining relationships and
data blending so always try to go with the relationships and now let's see the big
picture on how those four methods works and let's start with joints they're going to connect two tables at the
physical layer and they're going to create completely new logical table in The Logical layer where it's going to
combine the fields of both tables and then at the visualization layer the data sets going to create query at the data
source and and data source going to get the data from The Logical table and same thing for the union you can create it at
the physical layer of two tables and then going to create as well completely new table where the rows of both tables
going to be combined and at the visualizations table going to send a query to the data source and the data
source going to get the data from The Logical layer and now to the third method of the relationships we have two
tables at The Logical layer and tblo will not combine or create anything we are just describing the relationship
between a and b and at the visualization level tblo going to ask the data source and the data source going to get the
data from the Separate Tables and finally the data blending we have two data sources the first one going to be
called the primary data source the second one is the secondary data source so first T going to send query to the
primary data source and then another query to the secondary data source here it's important that the aggregation
going to happen before the data is combined and we are combining the data at the visualization level using data
blending so as you can see joints and Union happen in the physical layer in The Logical layer we can do
relationships and at the visualization level we can do data blending all right guys so now we're
going to create together two data sources because we have two data sets the big one and the small one and during
that I want to show you how I usually make decisions on when to use which methods so let's
go okay guys so now let's close everything and start from the scratch in order to get the data source correctly
created so let's let's start Tableau public we're going to create now the small data source on top of our small
data set so let's go to the connectors on the left side and click on text file and then it doesn't matter which one
you're going to use let's take the orders open I will delete it anyway in order to explain how I start so
previously I showed you the data model of our data sets we have a star schema where we have facts and dimensions I
always start with the fact table doesn't matter whether you are using star schema or snowflake always start with the fact
table so our fact table is orders so let's just drag and drop it here on the logical layer and then I continue with
the dimensions so we have customers and products so let's start with the customers just drag and drop somewhere
over here and table going to create a relationship between the orders and customers and since we are talking about
two different entities so we have orders and customers I always use relationships between them and now let's check the
relationships whether everything is correct so we go over here on the metadata we see the customer ID from
left the customer ID from right which is correct and now let's go to the performance options I will change only
the cardinality if the quality of our data is bad and we haven't done any data profiling then the best is to leave it
as default so many to many some record matches on the left and on the right but in the data sets we already check that
so we have clean star schema and always on the fact side on the left side over here it going to stay as many and all
the dimensions on the right side like customers it's going to be one because we have usually for example unique
customers or unique products so I will go and and chain that on the right side as one because it is dimension side and
on the fact side it's going to stay as many I will not touch those Integrity stuff so we're going to leave it as it
is and that's it we have now the customers and the orders connected to each
other and now before we continue building our data model we have to check something very important are we working
on the correct data sets in the correct format so now if you go to the orders over here and here we have some few
Fields like the sales quantity discount all those informations should be in number and you can check that by
checking the icons the data type icons and if they are like this hash value over here and green if you click on it t
going to say it is number decimal so if you see it like this number decimal or number then everything is fine but if
you see it as a string for example if you go over here and switch it to string so if you see this field as a string
there is something wrong so if your data is like ABC then you are working with the wrong data set it's not correct so
you should see it like a number so now the question is why it's wrong why it's not correct why Tableau didn't find it
as a number well there is different representations of the decimal separator in decimal numbers some countries like
in Europe we have a comma but in many other countries like in USA in Asia we have a DOT between the decimal number
and the whole number so now for example I'm now in Germany and my data is separated with a dots what going to
happen tblo will not understand this is a decimal number and it going to show it as a string and that's why in the
download link I have prepared two data sets depend on your location the Europe training data sets and the non- training
data sets the Europe training data sets all decimal numbers are separated with comma and for all other countries they
are separated with a DOT for the first downloader so now the question is how to fix it well go and download the correct
training data set there is another way in order to fix it for example now I have the Nur data sets and as you can
see the Discount sales profit everything is wrong everything ABC and strange now some of you thinks okay it's really easy
fix I can go to the data type over here and switch it from string to a number decimal so once I do that what's going
to happen everything going to be null so it will not work because Tableau don't know how to convert those numbers
correctly so let's move it back to a string in order to see the data again there is a fix for that if you go to the
orders over here and then right click on it and let's go to the text file properties so here we have different
properties about the files like the separator here we have it semicolon so TBL detect it correctly but what's more
important than this is the format of the decimal number the local so here we have to choose a local which is matching to
the current format so the current format is a DOT here in this example so what we're going to do we're going to go over
here and search for for example United States and as you can see table going to understand the correct format and
everything going to be changed to a number so the solution either you're going to use the correct data sets or
you can go and configure the properties of each file so I would say you can go and try Unite uned Stat or Germany until
you have the data type number so make sure that in the orders all those informations is the data type number all
right so now let's go and keep building our data model in the data source let's go to the next Dimension we have the
products so all what we're going to do is just drag and drop and then release it TBL going to create another
relationship between them let's check that again so click on that go to the metadata scroll up so Tableau did
automatically find the key for the relationship it is the product ID which is correct and now the same thing we're
going to go to the performance options on the left side on the fact side it's going to stay as many and on the right
side it's going to be one so on the right side we have the dimension it's going to be one you can check that
easily if you click on the product and here check the data you can see the product ID is a unique field there is no
duplicate inside it and we can go and use one if you are not sure just leave it as many to many relationship so let's
go again to the relationship we have it many to one and I'm going to leave it here as some recards matches no problem
and now let's go to the other tables we have here the customers details and here we have two options either we're going
to use relationships or joints so you can go over here and just drag and drop put it near the customers as a
relationship but to be honest in data moding if I have two objects about the same entity so here we have customers
and here another informations about the customers I tend to merge those two tables in one this is different than
talking about the orders and customers they are completely different entities and usually in data warehouses I I
prepare this step in the database or we can stay on Tableau and merge those two tables into one and we can do that using
joints so what I'm going to do I'm just going to remove the customers details away and then we're going to go to the
physical layer inside the customers and then we're going to take the customers details and drop it over here and tblo
as default going to leave it as inner joint but to be honest the customer table is for me the main table about the
customers and customer details is like secondary table so in order to not lose anything from the left side I'm going to
change the type of joint to left join so let's do that I'm going to click on the icon and then select left join then we
can check the results well the main thing that we don't get dcat or we don't lose any customers so as you can see the
output we have our five customers there is no duplicates and we didn't lose anything so let's go back to the logical
layer and just going to close this so as you can see we have list tables and we have one entity called customers we
don't have a lot of tables and I usually do that if we have a lot of tables about the same topic and now let's go to the
next table we have the order archieve and here we have the same situation we have two tables describing the same
entity the orders but of course we can connect it as relationships to the orders but again I like to minimize the
number of tables that I'm dealing with and I'm going to go and merge those two tables together and so here we have
again two options unions or joins if the tables has exactly the same number of columns and the same data types then we
can use Union in order to do that we have to do data profiling so either you open the CSV file and compare them
together or we can go over here there's like small icon like a table and if you click on it tblo going to show you a
symbol of data in order to do data profiling and to understand the content of this table so let's just make it
bigger so we have the order date shipping date customer ID product ID and as well the unit price and so on and we
can compare it to the orders over here and let's just make it bigger and we can find exactly the same number of
fields the same contents the same data types so that means we can go and do Union between them so in order to do
that I'm just going to close this and go to the physical layer inside the orders I like to drag and drop just beneath it
over here and now you can see we have a union let's check that on the right side in
the table name so we have orders and we have orders archieve so with that we combined both of the tables in one
logical table so let's close this and as you can see we have the icon that there is inside it a Union and with that we
have only three tables instead of having five tables it is just easier at the visualizations to deal with three tables
instead of five tables and the data model is much easier to understand and to explain and with that we have
connected all the CSV files together but we still have one file the Json file product prices sadly we cannot connect
it with the others in the same data source because it is different file type but we still can connect it to them if
we create a second data source and use data blending and now that sets we have our fact table and the Dimension we're
going to give it a name so I'm going to call it small data source and now you can pause the video
and go and create the big data source and if we are done I'm going to go and create the big data source so I'm
going to go over here new data source going to click on the text file then I will just go back to the big one here we
have only the three so we start with the orders always we start with the fact table and then we take the dimensions
let's take the customers customers I already checked all those IDs they are unique so I can
go to the relationships over here and change it to one on the right side and on the fact side it's going to stay as
many the same we going to do for the products drag and drop and all the ideas of the products
are unique so we can go to the performance option just to make sure we selected the relationship and select one
so that's it I'm just going to call it big data source so now in order not to lose those data sources in Tableau
public we have to publish to our public account so I will go and do that we're going to go to the sheet over here and
let's just take something like the customers drag and drop on the rows and that's it I will just go over here and
publish it save to tblo public and I have to sign in I'm going to call it data
sources then save and now it start publishing to our profile so that's it if you want to
download the file you can go over here and download Tableau workbook all right guys so with this we have created two
data sources on top of our data sets and we can to use them in the whole tutorial all right guys so with that you have
learned everything about the Tableau Data modeling in data sources and how to combine tables using the four methods
and in the next section we will start talking about the metadata in Tableau we will learn there are many important
tableau concepts for data visualizations the metadata of Tableau understanding the Tableau metadata
Concepts like data types measures Dimensions discrete continuous is very important in order to build a correct
data visualizations in Tableau and as well going to help you to understand how Tableau works with your data so first
I'm going to introduce you to the metadata in Tableau to learn what happens to your data once you connect it
to Tableau next we're going to dive into all data types in Tableau like integer string date and so on and after that
we're going to learn about the data type rules like the geographic Rule and the image rule and after that we're going to
cover very important Concept in Tableau we have Dimensions measures discrete and continuous and of course in order to
understand the differences between them we're going to compare them side by side in order to understand the big picture
so now let's start with the first topic where we can have an overview of the basic concepts of metadata in Tableau so
now let's go [Music] all right so now we're going to have a
quick introduction to the Tableau metadata in the data sources in order to understand what's going to happen to our
data once we connect it to Tableau after connecting our data to Tableau and building the data model in the data
sources the next step is to check the metadata of the tables and the fields because once you connect your data to
Tableau Tableau can to start analyzing the content of your data to make assumptions about the types and roles of
each field in the data source so tblo going to assign each field to data types like integer string date and so on data
types gives us informations about the kind of data stored inside our data sets this piece of information is very
helpful for Tableau in order to understand how to deal with your data which rules operations calculations can
be performed and one more thing that Tableau going to do it's going to assign each field to a role these roles going
to help Tableau building the visualizations so the first set of roles we have dimensions and measures
Dimension fields define the level of details of the view and the fields with the RO measure going to be used for
aggregations in The View and we have another set of roles we have discrete and continuous these rules can help
Tableau by plotting the visuals so discrete Fields can break the view to separate values and the fields with the
continuous rules going to plot unbroken chain and connected values in the view and I call all those informations about
your field as a metad DAT in the Tableau Data Source one more thing that I want to tell you is that those assumptions
that Tableau makes about your field is correct around 90% so that means there is a possibility that those assumptions
from Tableau are wrong that's why it's very important after you build the data model is to have a double check on the
metadata to check that all the informations are assigned correctly otherwise you're going to have bad
quality and bad results at the visualizations all right so next we're going to do a deep dive into these
important Concepts in order to understand them and the differences between them
[Music] all right so we can find data types not only in Tableau but in all programming
languages but they don't support exactly the same data types and that's why if you are learning new programming
language or an application like Tableau it's very important to understand which data types they support and now the
question is what is a data type the data type give us information about the kind of information stored inside our data
and this piece of information is very important for programming languages and applications like Tapo in order to
understand how to deal with your data which rules operations and calculations could be performed on top of your data
now if you look closely to our data you can see that each field in our data source must be assigned to a small icon
or a symol those icons indicates the data types of each field and now one more thing once we
connect our data to Tableau Tableau going to analyze our data in order to assign automatically the correct data
type to our Fields well most of the times Tableau does it correctly but sometimes things goes wrong or you want
to change the data type of specific field this is really easy either you can do it on the worksheet page or at the
data source page you will get exactly the same effects so let's go to the data source page and let's go to the orders
and click on the icon over here you can see it's number Hall we can change it to a string so what we're going to do we
just going to click on the string and that's it we just changed the data type of the order ID but let's say we want to
change it back as Tableau did it at the start what we're going to do we're going to go to the icon over here again and
then we go to the default and it's back to the original data type that Tableau did assign at the start and here one
more thing to notice is that the data types are really sensitive in the joints and the relationships for example if we
go to this relationship over here between the orders and the customers the key is the customer ID those keys should
have exactly the same data type so let's say we go to the orders and let's change the customer ID from number to string so
we're going to go to the string over here and we change it and immediately you can see at the data model the
relationship between the orders and customers is now broken and you can see at the tool tip it going of says type
mismatch between the customer ID the string and the customer ID number so as you can see now Tableau is very
sensitive with the data type of the key whether you are using relationships joints data blending doesn't matter they
should have exactly the same data type so now in order to correct it as you can see we don't have anym the data review
the data grid so how we can change now the data type we're going to go to the metadata grid and we're going to do the
same thing we're going to go to the customer ID just click on the data type icon and change it back to defaults or
to number so I'm just going to click on default and tblo going to be happy now and the tables are related again and the
third way to change the data types you can go to the worksheet page and same thing over here you can go to the icons
and change the data type so as you can see it's really easy in Tableau we have bunch of
different data types that's we're going to cover in this tutorial and I group them into three categories first we have
basic main six data types we have the number hole number decimal string date date and time and bullion and the second
group we have roles we have Geographic roles and image roles and the last group we have Advanced Data types like group
cluster group bins and set and this group contains special data types that's introduced from Tableau for data
visualizations and they are specially made in order to organize our data in this tutorial we're going to focus on
the first two groups the basic and the role and for the Advanced Data types I'm going to dedicate another full tutorial
just speaking about them all right so now let's start with the first group the basic data types where we're going to do
deep dives into each type in order to understand them so let's go all right so now we're going to talk
about the data type number if our data contains only number nothing else it contains digits from 0 to 9 then we can
call it a number data type and it's very important to understand that numbers cannot contain any characters for
example let's say that we have the following phone number in our data this type of data we cannot call it a number
because it contains characters like we have the minus we have the plus because the number data type can only have
digits from 0 to 9 and now if we remove those characters from the phone number then it's going to look like this and
only now we can give it the data type number and in Tableau the data type number has this icon it's like hash and
for numbers we have two data types in Tableau we have number ho and number decimal so what is the difference
between them you know in math a positive or negative number could be splitted by dots the first part we call it a whole
number and the second part we call it a decimal so if your numbers does not include decimal dots or any fractions
then we can call it a whole number like 3 minus 100 zero and so on but if your number contain dots and fractions then
we call it a decimal number like 2.4 or 3.99 and here you need to be careful which one you are using especially if
you are making calculations in Tableau for example if you want to divide two numbers like 1 divide by two if the
output field has the data type whole number then the result going to be zero but if it has the data type number
decimal then the result can be correct 0.5 and this is exactly the difference between those two data types all right
so now let's check our fields in Tableau to find out which one has the data type number and I would say let's check the
orders over here and you can see we have the order ID customer ID product ID by just checking them you can find that all
of them are numbers they don't have characters and they don't have fractions so that means they should have the data
type number hole as you can see all of them is number hole let's check another fields on the right side we have here
sales we have discount profit and as you can see they have fractions so those numbers should be a number decimal so
let's check that you can see TBL did automatically fig fig out that those numbers are number decimal but for the
quantity it's whole because we don't have here any fractions so that says everything is
fine all right now we're going to talk about the data type string the string data type is one of the most widely used
data type in all programming languages a string data type is a sequence of characters and it could include anything
like letters numbers bases and any other type of characters and you can think of a string as a plain text and any field
in our data source could be a string so string is like a default data type and it has no rules or whatever like the
other data types so that means you can convert any fields in your data source to a string data type without any
problem and Tableau as well uses the string data type when it couldn't find any suitable other data type for your
Fields so now let's check in our data sets where we can find Fields with the data type string so let's check first
the products over here you can see we have here two strings the product name and the category in the product name we
have characters we have spaces we have numbers so those are the data type string let's check the customers over
here we have the first name last name both of them are string but now you might notice or ask you know what we
have City and Country both of them contains like characters why don't we have the icon of ABC is it like string
well the answer is yes because if you just click on the icon you can see that tblo did assign it to a string but here
the difference is that they have an extra role we have the geographical role and you can see tablet did assign it to
a country and here tblo going to give it another icon just to indicate that this field has a geographic role but the
basic the main data type for that is a string and the same is for the city okay now we're going to talk about
one of the most confusing data type it is the date if your field stores informations about the calendar data
then this field is going to has the data type dates and dates have very different formats in different countries for
example in Germany we have the following date format you see we use dots instead of slashes but date in the international
formats follow another rule where the date can to split it by a minus and in the world there are many many different
formats so those dates follow specific formats and we describe it with the following code for example for the
international formats we have this code it's going to start with the year and the year has four digits that's why we
have four times y then we have a minus and two digits for the moners so we have mm minus two digits for the day d d so
there is like a code for each part of the dates we have the day months year weeks and so on in this table I'm going
to leave the link on the description you can find all those codes and the descriptions of That So with that you
can customize the date format as it suits you and don't worry about it Tableau understands almost all date
formats that we have and in our data we could have not only the calendar data but also informations about the time
then we have in Tableau another data type for that we call it date and time and in programming languages or
databases you might heard already about the timestamp but in Tableau we call it date and time so it might look like this
we have the date then space and then afterwards we have informations about the hour the minute and the seconds and
like the dates it could has as well different formats you could have the millisecs or the time zone and many
other stuff so here we have again a table of all the codes for the time informations you can find it as well in
the same link all right so now let's check our data to find out which Fields has the data type date usually in Star
schema data model all the dates are placed at the fact table and our fact table is the orders so let's check that
you can see we have two Fields with the data type icon dates we have the shipping date and the order date and
it's not date and time because we don't have in the data informations about the time so both fields are dates we can
check here and as well here and in the other tables products and customers they don't have any dates or times because
they are dimensions they are not events and usually don't don't have any informations about the date all right so
now let's go back to our orders to our two fields and as you can see the format here is that they are splitted with
slashes let's say that you don't want this format you want something else so now how we can change the date format in
Tableau in order to do that we have to go to the worksheet page so let's go to the worksheet page over here and now you
have to decide something do I want to change the date formats for the whole workbook for the old visualizations so
that means you are changing the default format of the date or you want to change the format only for this view only for
one visualization so let me show you how you can do both so now let's put something at our view I'm going to take
the order ID drag and drop it over here and let's work with the order date so I'm going to drag and drop this on the
text table going to show it as a year so I want the exact date in order to see the format so as you can see our date
has the following format and now I want to change the default date format for the whole workbook so in order to do
that we're going to go to the left side to the order date right click then we go to the default properties and here you
can find the date formats so if you click on that automatic it is what Tableau did figure out at the start and
then we have some predefined formats from Tableau what is interesting is at the end we have custom so our new format
for the date going to split with the dots and the year going to have only two digits so the code format going to be
like this DD for day then dots mm for month and for the year we're going to have only two digits that's going to be
y y twice let's hit okay and as you can see tblo did change the date format in tblo blow so now let's go and duplicate
this worksheet over here by right clicking on it and then duplicate as you can see in the next worksheet as well we
have exactly the same format that we defined so this means that the format that we defined is a default now for the
whole workbook but now let's say that I want to change it only locally at one visualization and I don't want to change
the default format for the date so let's duplicate that as well once again and now instead of going to the
left side we're going to stay at the view and we're going to go to our field right click on it and then we go to this
one here format once you do this on the left side the datab ban going to switch to the format Pane and over here on the
left side you can see dates so if you click on that we're going to get exactly the same stuff over here those are the
predefined from Tau we have the automatic at the top and at the bottom we have the custom so now let's choose
one of those predefined I'm going to take the week and the year so let's click on that so as you can see tblo did
change the date format in this View and now interesting to check the other sheets whether the date format did
change so let's go back to the previous sheets and as you can see they stayed at the default format of the date so with
this you learned how to customize the format of the date for specific view or for the whole workbook but now I want to
change the date format as before so in order to do that so I'm going to go over here close this formats then go to the
order date again right click default properties date format and then we just click on the automatic and hit okay so
as you can see we have again the same old date for so that's it this is how you can work
with a data type date all right now we're going to talk about the last data type in the basic
category the buan data type the buan data type represent a fields that has only two values true or false it's like
the language of computer we have only one and zero and this data type is often used in the output of a condition or
logic so for example if I ask you do you like this video so far so the answer is going to be yes or no if you like this
video please give it a like so the answer for this question can to has the data type bullion either yes or no true
or false and no any other values and don't forget to subscribe so the bullan data types has many use cases for
example control the workflow of something if the output is true then do something if false then do something
else all right so now let's check whether we can find any bullan data type in our orders we can check over here we
don't have any Pion data type and the customers as well nothing and in the products well we don't have
any fi with the Boolean data type well usually data type Boolean going to be add once we use conditions in taow and
once we create new calculated fields and now to create the calculated field we're going to go to the worksheet page so
we're going to go sheet number one and now make sure to select the small data source then we go to this small icon
over here and now we select create calculated field so let's click on that we will get a new window to write our
expression or our condition I'm going to give it the name of logic 400 and now what we going to check or what is our
condition if the sales is smaller than 400 then should be true otherwise going to be false the logic is very simple so
here we're going to find the sales smaller than 400 and that's it if the sales is smaller than 400 it's going
to be true otherwise going to be false let's click okay and once you do that you can find on the left side we have a
new field called logic 400 and it has the data type volum the output has only two values true and false so let's
validate that I'm just going to drag and drop this on The View over here and as you can see we have only false and true
and let's check whether the logic is working so we're going to take the order ID and just put it before it and now we
need the sales so we're going to take the sales drag and drop it here on the APC and here you can see for example the
first order it is smaller than 400 that means the logic is true which is correct and then the next one it is above 400
it's false and so on so we can see if the field has only two values true and false then the data type going to be
Boolean and we usually use it as an output of a condition and the Boolean data type has a lot of use cases for
example if you want to filter our data anything above 400 we don't want to see it in our visualizations so what we can
do we can use the logic in the filter just drag and drop that on the filters and we're going to select only the true
so I'm going to unmark the false and then hit okay and as you can see the result going to show only the orders
with the sales less than 400 and with that we just filtered our data very easily
all right so with that we have covered the basic six data types in Tableau so now let's do a quick recap we have the
number hole is for fi that stores only numbers without characters and those numbers are without fractions or decimal
dots next the number decimal is as well for fields that have only numbers without characters but those numbers
could have fractions or decimal dots string is a sequence of any characters it could be numbers letters special
characters or spaces and then we have date date is for fields that stores informations about the calendar dates
next we have the date and time is as well for fields that stores informations about the calendar and as well about the
time and it has as well specific format and the last time we have the bullion it can store only two values false or true
and we usually use it for conditions okay guys so the first role that we're going to talk about is the
geographic rule if you have in your data field that contains location informations or geographical areas then
you can assign it to a geographical role in Tableau based on the type of the location such as City Country postal
code and so on assigning this extra role can to help Tableau to plot your data correctly if you are using map
visualizations in Tableau there are over 12 Geographic roles but I think the most important ones are country City and zip
code now let's check our data but first some coffee let's go all right back to our
data source let's go to the customers table there we have some informations about the location of the customers and
here we have three fields we have country City and postal code and now in order to check the geographic role just
click on the icon over here on the data type and again here it's very important to understands each field must have a
basic data type so for example the postal code is a number hole and then we assign an extra role for it so having
the geographic role will not remove the number data type so now let's check the geographic Ro over here and you can see
that Tableau didn't assign it to anything so it stays here none and this is a ZIP code or post code so we're
going to correct that we're going to just click on this over here to assign a geographic role and you can see the icon
did change so with that we have the data type number and we assigned a geographic Ro for it let's check the others so this
should be a city so let's click over here the basic data type is a string because we have characters and let's
check the geographic role tblo did it correctly we have it as a city so that is correct let's go to the country over
here we have it as a string and then the geographic role is country so with that
we have all location informations assigned correctly to the geographic role and we can start building a map
visualizations in Tableau let me show you an example let's go to the sheet number one over here and what we can do
we can go to the customers over here and let's take the location informations so let's take the country the city and
let's have one metric so I'm going to take the sales drag and drop it over here on the APC so as you can see it's
only a table we you want to switch it to a map in order to do that go to the show me over here and then click on the map
so you can see Tableau did correctly plot our data let me just close it and assign for each country The Matrix and
this is done because we assigned our data to a geographic role all right so now let's talk about
the other one we have the image roll this is brand new tblo just introduced that in 2022 so in princip if your field
stores a URLs pointing to IM then you can assign this field to image Ru with the URL to show the images in
the visualizations and Tableau have here some requirements so the first one table supports only those three image
extensions and the URL should begin with the HTTP or https and the third requirement the maximum number of images
in each field is 500 and then we have the image size it should be less than 128 kiloby but though things might
change in the time since it's completely new feature in Tableau and I think the most Ed Case for this is to show the
product images in your visualizations all right so now let's see an example in Tableau about the image role in our data
sets I have prepared some URLs inside the table products but only in the small data sets so let's check that if you go
to the products over here we have a field called Product images and here we have URLs pointing to images in my
website so now let's check the data type over here it is a data type string this is the basic one because a URL is a
sequence of characters and now we can add on top of this basic data type an image image roll and it's really easy we
just go over here to the image roll and we click on the URL so let's do that and with that we have a new icon indicates
that this field has the role of image so let's check the data we're going to go to the sheet number one then we go to
the products make sure we are selecting the small data source then we go to the products image just drag and drop over
here and as you can see now we have some images about the products but two of them are broken and I think it's still
bugging at the disktop version of Tableau public because if we publish now to table public in the web we're going
to have all the icons correctly so now we can go and grab another field let's take the sales drag and drop it over
here and with that we have a nice images to The Matrix let's go and publish that in tblo public I'm going to call it view
with image let's save and as you can see now in tblo public we have all icons nothing is
broken so I think if you are building dashboards about the products it's really nice to show the image of the
product instead of the names it's just more catchy have images inside the visualizations dimensions and measures
in Tableau so once we connect our data to Tableau Tableau going to analyze our data in order to assign each of our
fields to either a dimension or measure this kind of metadata going to help Tableau to blot our visualizations all
right so now the question is what is dimensions and measures well Tableau didn't invent the concept of dimensions
and measures it is an old concept of Pi and now we get going to have a quick origin story if you learn the concepts
of data warehousing and business intelligence you might already know that the core concept is the
multi-dimensional olab online analytical processing so the concept says if you want to answer the business questions or
do data analyzes first we have to build a data model that has the shape of a cube with multi-dimensions it's
something like this Cube and each Cube has two informations first we have the dimensions of the cube and the second
informations we have those cells those cells can store informations like data numbers and we call it measures so each
Cube has two informations the dimensions and the cells the measures and now let's have an example we have the cube of
sales and it has three dimensions the First Dimension is the locations and inside the locations we have three
members USA France and Germany those three values are the member of the dimensional location and we have another
dimension called time and it has three members in the dimension January February and March and the third
Dimension we have the categories and now inside the sales of the cube we have the measure sales so now our cube is ready
with the dimensions and measure and we can start answering the business questions for example find the total
sales in USA so what going to happen we can select the dimensional location and filter the dimension to have only the
member USA this operation in the cube we call it slicing the cube and then we're going to aggregate the measure and we
will get the total sales of 120 and if you have Cube we can do multiple operations like slicing dicing roll up
drill down and beot so if you have such a cube we can do data analysis and find fast answers to the business questions
so now to summarize Dimensions contain qualitative values they usually describe something like the product name the
product category customer location and we use Dimensions to categorize filter and show the level of details and in the
other hand we have the measures they contain numeric quantitative values that can be measured like the name says and
the measures unlike the dimensions they can be aggregated all right so this might be
still confusing and if you say you know what if I look to my data how do I decide whether it's a dimension or a
measure so here is my decision- making process first I check the data type of the field whether it is a number if the
answer is no then this field is a dimension but if the answer is yes then we going to ask the next question does
it make sense to aggregate the values of the field like doing the sum calculation on the Val values or finding the average
value if the answer is yes then it is a measure but if the answer is no then it is a dimension so what this means all
non-numeric fields are dimensions but not all numeric fields are measures that really depends on the questions whether
it makes sense to aggregate the values if yes then it is a measure if no then it's Dimension okay so now let's
practice in order to understand the concept of dimensions and measures and how they work we will check our data
sets and we going to assign each field to either Dimension or measure we going to do the table customers together and
then you can go and pause the video in order to do the products and the orders and then at the end we're going to check
the result together so let's go we're going to start with the first field the customer ID the customer ID is a number
so we cannot say it is automatically a dimension we're going to jump to the next question now does it make sense to
aggregate it well we have here to understand that the customer ID is a unique identifier for the customers for
example Maria has the customer ID number one Martin has four and now if we sum all those values we're going to get the
value of 15 or if we do the average we're going to get the value of three those values don't make any sense
because we use the customer ID only to identify the customers and I don't think that we will be in situation where we
have to find the average of the unique identifiers so since it makes no sense this field is a dimension and with that
we can assign the customer ID to a dimension now let's go to the next one it is much easier because we have here
the first name and it is not numeric so it is automatically Dimension the same goes for the last name it is as well a
string it is not a number all right so now let's move to the next one we have the post code or the ZIP code it is a
number so we can to ask the question does it make sense to do aggregation here well I don't think there will be
situation where we have to find the sum of the postcode or to find the average of it so that means it is here again
it's a number but it is a dimension so let's assign the value for that and then the next one it is easy so we have the
city and the country both of those values are string so it is automatically a dimension so let's assign it
again okay so let's move to the last field we have the score here it's again a number so we going to ask the question
does it make sense here to do aggregations well the answer is yes it really makes sense to find the average
of the score that's why we're going to map it to a measure so on the table customers we have six dimensions and
only one measure and now you can go and pause the video in order to practice with the table orders and as well with
the products all right so now let's check the results as you can see in the table
orders we have a lot of measures because it is a fact table and fact tables in the star schema is the central place for
the measures so this is very normal so let's check the fields we have the order ID customer ID product ID it is like the
customer ID those are identifiers and it doesn't make sense to aggregate it so that's why we have it as Dimensions the
order date and shipping date those informations are not numeric and that means it is dimension and then we have
all those informations the sales quantity discount profit unit prices all those fields are numbers and here it
makes sense to do aggregations like the sum or the average so we're going to use the orders the fact table if we need any
measure let's go to the next one to the products and here this one is easy the product ID is like again the identifier
it doesn't make sense to do any aggregations we can have it as Dimensions product name and category
both of those informations are string they are non- numeric and that's why they are dimensions so I hope with this
you have understood how I usually do it by just looking at the data we could decide whether it's a dimension or
measure all right so now back to Tableau and the first question is where do I find in
Tableau whether my fields are measures or Dimensions well there is no icons for dimensions and measures and as well we
cannot check that at the data source page in order to check the dimensions and measures we have to go to the
worksheet page so let's go to sheet number one and then we're going to go to the datab ban on the left side over here
let's open any table for example the orders and now if you look closely to the table orders you will find like fine
gray horizontal line which splits the fields of the orders into two groups the fields above the line they are the
dimensions and the fields below the line they are the measures so for example we have the customer ID the order dates
order ID product ID and so on those fields are dimensions in Tableau and the fields below the line the discounts the
quantity sales and so on those fields are measures and you can find this splitter this horizontal line in each
table so if you go to the customers over here you will see again the same line that splits Dimensions from measures and
and the same if you go to the products scroll down we have again the same line and one more thing that you might
already noticed let me just close those tables that outside the table there is as well a horizontal line sometimes in
Tableau we create fields that doesn't belong to any tables and Tableau going to put it just outside of the tables
it's like Global fields and for that we need as well a splitter to split the fields to dimensions and measures okay
so now let's go back to the orders and now you might say you know what we don't need this horizontal line to identify
whether the field is dimensional or measure and now if the field has the color of blue then it's Dimension and if
the field has the color of green then it is measure well this is exactly where most of Tableau developers get confused
and things gets mixed up between Dimensions measures and discrete continuous and to be honest I was
thinking the same at the start until I found out that the color of the fields indicates whether the field is discrete
or continuous we're going to talk about this concept in the next tutorial don't worry about that so the color does not
indicate whether the field is dimensional or measure but the position of the fields whether it's above the
line or below the line and let me show you quickly something let's take any Fields over here the product ID let's
just drag it little bit and now table going to Mark the horizontal line with orange and going to show you okay
anything above is dimension and anything below is measures so tblo shows that as well all right so now to the next
question how do I change a fields from Dimension to measure and vice versa and here you have two options either you're
going to do it globally for the whole work for all the views or you might do the change locally in one individual
view so let's see how we can do that let's start with the first one where we're going to do the change for the
whole workbook for All Views so globally we're going to go for example let's take the order ID over here just right click
on it and then we go over here convert to measure so let's click on that and as you can see the field order ID just
jumped from above the line to below the line as a measure and now if you want to change it back to Dimension just right
click on it and then convert to Dimension so that's it it's really easy and now let's see how we can do the
change locally at one view without affecting the whole workbook so let's take again the order ID drag and drop it
over here and here we're going to right click on it on The View and then we're going to go to the measures we're going
to convert it to a measure currently it is a dimension so let's go to the measures and we have to select one of
those calculations so let's take for example the sum and now as you can see the order ID only for this view is a
measure but the order ID on the left side for the whole workbook it stays as Dimension and that's it this is really
easy how you can convert between measures and Dimensions all right so now let's have
an examples in Tableau in order to understand the main purpose of measures and dimensions so let's go to the orders
on the left side over here in the small data source and let's take one measure the sales we just going to drag and drop
it on the text over here and as you can see tblo going to start immediately doing aggregations on the measures so
now if we check the data we have only one number this is the total sales that we have in our data set and now we are
at the top level of details where everything is aggregated in only one number and now we have to add more
informations in order to understand this number and in order to do that we're going to use Dimensions so for example
let's go to the products over here and let's take the category so I'm just going to drag and drop the category over
here and as you can see now the dimension is splitting our measure into two rows so that means we have now one
level lower of details than the top aggregation and now let's take another dimension we're going to take the
product name so let's just drag and drop it over here near the category and as you can see using this Dimension going
to give us different level of details about the sales than the First Dimension the category so what happened we just
moved with the details One More Level beneath that and now let's take Third Dimension we're going to take now the
order ID from the orders so just drag and drop it near the product name and now as you can see this Dimension going
to bring us to the lowest level of details where the aggregation of the measure is exactly the same original
value and as you can see the dimensions Define the level of details in our views and each Dimension can to take us to
different levels of details and always if you want to go to the top level of details you have to remove all
dimensions and only have the measure so as you can see as we are removing those Dimensions we are going to the top level
of details another nice way to show that if we go to the tree map visualization so let me just go back over here to have
one dimension let's go to show me and then click on the tree so now you can see our data is splited to only two
details so now as we add Dimensions let's take again the product name over here drag and drop it on the label you
can see the view split it to more details and if we go to the lowest level if you take the order ID again over here
to the label we can see the view is splitted furthermore and now I'm going to tell
you a small secret if you follow it you can generate hundreds of reports even if you have small data sets if you combine
any measure with any Dimension you will be creating a new view or new reports with a title following this pattern
measure by dimension for example sales by product profit by category Quant entity by country so if you follow this
pattern you can generate endless amounts of reports and Views in Tableau all right so now if you count the dimensions
and measures in our small data sets we have around 16 dimensions and 10 measures so that means if you follow
this rule you can generate around 160 views and reports so even we have small data sets we can
generate huge amounts of views and reports so as you can see in the visualizations if we combine both of
them we're going to have sales by order date sales by shipping date sales by country and so on all right so now let
me just show you how we build usually reports in Tableau using dimensions and measures we're going to work now with
only one measure the sales and we're going to make dashboards about it so let's stay at the small data source and
we're going to take the sales from the orders let's just drag and drop it somewhere at the rows and now the
dimension going to be the product name so let's take the product name from the products let's drag and drop it over
here so that's it now we have to call it sales by product so let's just rename the sheet over here right click on it
and rename sales by product all right so now we're going to create another one using the
same measure but different dimension so what we're going to do we're going to just going to go and duplicate it right
click on it and duplicate we're going to have now the sales by category I'm just going to rename it again and let's call
it sales by category and now we're going to remove the product name from here so just drag and drop it somewhere at the
white space and then we go again to the products drag and drop the category on the columns and now we're going to use
different visualiz ations so I'm going to go to the show me over here and let's use the pie chart so click on that all
right so now we have like a pie chart but I would like to show the values so go to the label over here click on it
and click on this Mark show Mark labels in order to show some values so that's it this is our second one all right so
now we're going to create the third one with another dimension we're going to take the order dates but we're going to
show only the months so we're going to go over here and duplicate it again let's just rename it so I'm going to
call it sales by month so we will go now and remove the category just drop it here and then let's take the order date
drag and drop it on the columns we're going to switch the visualizations to power so I'm going to click on this over
here on the bars so as you can see here table going to show the years of the order date we want to have it as a month
so we have to switch dots just right click on the dimension and then over here just select the month so let's do
that let me just close the show me over here and then let's add some labels all right so that's what it for
this view let's make the last one we're going to make sales by country so let's duplicate this again and we're going to
call it sales by country and then we're going to remove the dimension order dates and then we're
going to take the dimension country so just drag and drop it on the rows so now since we have the country we can change
it to a map so let's do that we go to the show me over here and then select the map click on that all right so now
we have a map showing the sales by country all right so now we have those four reports or sheets we can build now
a dashboard in order to create a new dashboard so we're going to go to this icon over here click on it and before we
start I'm just going to give it a name so let's call it sales
dashboard all right okay and now we're going to go and drag and drop all the sheets so we're going to start first
with the country so let's just drop it here in the middle and then we're going to take the category just beneath it
then the product beside it let's resize a little bit to the left and then we're going to
take the last one the Mones and put it over here and as you can see with just four dimensions and one measure we were
able to make a dashboard about the sales and just following this small rule sales by country sales by category sales by
product and sales by month so always measure by Dimension and now it's really easy to train just go and pick another
measure with different dimensions and build different dashboards all right so now let's have a
quick summary where we're going to compare both dimensions and measures side by side in order to understand the
differences between them let's start with the definition dimensions are fills that contains descript values and
measures are fields that contains quantitive numeric values for example we have Dimensions like product category
country and customer ID and in the other hand we have measures like sales profit and quantity the next point is about
aggregating Dimensions cannot be aggregated as each member of the dimension is unique measures however can
be aggregated using functions like sum average minan Max and so on for example you can calculate the total sales for
specific product category moving on to the data types all different data types can be used as Dimensions like string
date Boolean and even numbers like we have learned the customer ID but only the fields with the data type number can
be used as a measure the next point is about the role of analyzes dimensions are typically used for grouping
filtering and organizing your data and measures in the other hands are used for calculations and numeric analyzes and
the final point is about the granularity dimensions Define the level of details of the data and the granularity of
measures on the other hands determines the quantity being measured so this are the main differences between dimensions
and measures all right guys so now we're going to talk about discrete and
continuous here again once we connect our data to Tableau Tableau going to analyze our data in order to make
assumptions where it's going to map each field to either discrete or continuous discrete and continuous are metadata
informations that's going to impact on what type of visualizations that you can create as well as how they will look
like so now in order to understand the concept behind them we're going to compare both discrete and continuous and
first we're going to start with the definition so this concept comes from math and they say discret values are
always separated disconnected distinct values and continuous values are exactly the opposite it's like connected value a
serious or unbroken chain of data without any interruptions so let's have an an example think of discret as you
are counting from 0 to 10 so you start with 0 1 2 3 and so on so that means between 0 and 10 we have exactly 11
distinct values but with the continuous values we have like real numbers which means between 0 and 10 we have infinite
number of real numbers so for example we have 1.2 1.3 1.4 and so on so with discrets we have distinct values and
with continuous we have a range of infinite values between start and end once I read about the discrete and
continuous and the following analogy stick in my head think about the discrete values as IL legal pieces so
you can take them apart and you can work with each piece differently and independently so you can move them
around and analyze them in different orders and now think of continuous as a roll of yarn and now when you unroll the
yarn you will not get different pieces you will just see more of the yarn so you will just get a longer piece of the
same string all right so discrete values are separated distinct values and continuous values are unbroken chain of
data without any interruptions all right so now let's move to the next point we have the colors in Tableau the discrete
fields are the blue pills and the continuous fields are the green pills so let's see in table what this
means all right so now as usual the first question is how do I know whether my fields are discrete or continuous
well it's like the dimensions and measures we cannot check that at the data source page we have to switch to
the worksheet page so let's do that we're going to go over here and now now it's really easy so now as you hover
your mouth on those fields you will see we have only two colors the blue and the green and you can see those colors as
well on the data type icons so we have icons with green and icons with blue the fields with the blue color like for
example the customer ID first name order date and so on those fields are discrete fields and the fields with the green
color like Discount sales unit price score and so on those fields are the continuous fields and here exactly comes
the confusion where a lot of Tableau developer think that the blue indicates for dimensions and the green indicates
for measures well that's wrong those colors to indicate whether it's discrete and continuous so now you know
that so let's start with the first one where we're going to change the role of field globally for the whole workbook so
in order to do that we're going to go to the data Bane on the left side and as you can see here for example the sales
in the orders is green pill that means it's continuous field and as well it is a measure so let's say that we want now
to switch it to a discrete field so in order to do that right click on the field and here we have convert to
discrete it's really easy so let's click on that and now if you check again the sales we have it now as a blue pill so
that means now it is a discrete field so if you check the others all of them are continuous measures but only the sales
is a discrete measure and this change is done globally so if you go to another sheet the sales going to still as a
discrete field so now if you want to switch between discrete to continuous all what you're going to do is right
click on it and here we have again the same option we're going to convert it to continuous so once we click that it's
going to go back to the green pill so that's it it's really easy now we're going to learn how to switch between
discrete and continuous locally for only one view all right so let's build a view we're going to drag and drop the sales
on the columns and let's take a dimension for example the category drag and drop it on the rows and now we want
to switch the sales from continuous to discrete only for this view so what we're going to do we're going to go to
the sales over here right click on it and as you can see the current roll is continuous as Tableau market for us here
or you can see it from the green pill all what you have to do is to select discret so let's go and do that and now
the field sales is discrete for this view as you can see it's blue pill but if you go to the data Bane on the left
side the sale stays as continuous with the color of green so that's how you can do it locally for only one view so for
example if you go back to another worksheet and take the sales the sales going to be a continuous measure so
that's it this is how you can switch between discrete and continuous Fields locally for only one
view all right so now let's move to the next point we have filters in Tableau the discrete field going to create a
filter with distinct values but the continuous field going to create a filter with range values all right so
now let's have an example in order to understand what I mean with those filters and now we're going to work with
the big data source because we need more data in order to understand this all right so now let's switch to the big
data source just click on it and then let's take the sales drag and drop it over here and then we're going to take
from the products the subcategory so drag and drop it on the rows so now we have the sales by the subcategory and
now if we want to go and filter those values we can go and put the subcategory in the filters and don't forget that the
subcategory is a discrete field so let's just drag and drop it on the filters and see what going to happen and now in the
new window as you can see over here Tableau listed all distinct values inside the subcategory and now here with
those discrete values we can make decisions individually so we can include some stuff or remove others so let's
just do do I'm just doing this randomly and click okay and that's it so this is how the filter in tblo going to react if
we have discrete field inside it so we have a list of all distinct values and we can show this filter on the right
side if you just right click on the subcategory over here and then select show filter so now we have it on the
right side and we can now include or exclude values and now let's see what's going to happen if we put in the filters
continuous fi so let's take the sales again since it's continuous fi but instead of taking it from the left side
here from datab ban you can take it from the shields by holding alt and then drag and drop in the filters so since it's
continuous field and a measure tblo going to ask us first do we want to do the filter in all values or after we do
the calculations so let's go with the sum over here since we have it as a sum so I'm just going to click on the sum
and go next and this is exactly what going to happen if you have continuous field as a filter you will get to range
it has a start and ends so you don't have like distinct values of all the sales you will get a range of values and
you have to define the start and the end and here we have different options about the range but we're going to stay with
the first one so let's hit okay and now I want to show the filter on the right side so let's go over here right click
on show filter and now on the right side you can see exactly the difference between discrete and continuous fields
in filters so let me just extend it over here you see the sales is continuous and we have range so we can filter like this
by changing the start and the end of the range but with the discrete filter we have all members of the field and we can
decide on each value individually so we can just select and deselect those values all right so now let's move to
the next point we're going to talk about the changes in the view discrete Fields create the headers of the visualizations
where the continuous Fields creates the axis of visualizations okay so now let's see what this means in our view as you
can see the subcategory is a discrete field and the sales is continuous field and in this view over here we have three
things we have the marks those parts and on the left side we have the subcategory and we call those informations as
headers and the third information we have the access of the view so what is the difference between headers and axes
the discrete Fields like subcategory always create the header of the view and in the header over here you have like
list of all distinct values inside our data set exactly as it is but The Continuous field like the sales create
the axis of the visualization and it's like the values inside a filter it's a range that has a starts and ends and
unlike the headers you cannot see in the AIS all the possible values individually so you have a range with start and ends
and in between we have pens so discrete Fields create the headers and continuous Fields create the
axis all right so the next point we're going to talk about sorting data in discrete fields we have many options in
order to sort the data but with the continuous fields in Tableau it is very limited so let's see an example so we're
going to stay with the same example and we going to start with the discrete field subcategory so in order to the
data in the discret field just right click on the subcategory over here on the shelf or you can go to the header
it's exactly the same so right click on the subcategory and then we can select over here the sort so select that and
now we have extra window to set up the sort so as you can see here we have many different options like alphabetic Field
Manual and so on so let's go with the manual over here and here again since subcategory is discrete Fields we're
going to get the list of all distinct values and then we can change the order for example by just clicking on the
applications we just can break it down and we can take the storage and bring it up blenders down and so on so we can do
it manually without any rule so as you can see as I'm changing the values their order in the visualization is as well
changing so if you want to sort the data we're going to use the discrete fields in order to do that since we have many
options and now let's check the continuous Fields so I'm going to close this so now if you go to the continuous
fields on the sales right click on it we don't have here an option to sort the data like in the discrete Fields but
instead we have only one option if you hover on the sales we have this very small icon and we can use it in order
order to sort the data ascending or descending so just click on that and as you can see now the data is sorted by
descending values and if you click on that again you will get the data as ascending so sorting the data using
continuous field is very limited but instead of that we can use the discrete fields in order to sort the data since
we have many options okay so now let's move to the next one and this is really important to
understand what is really the purpose of having continuous and discrete in Tableau the main use case of using the
discrete values is to do a deep Dives analyzis in specific scenario and in the other hand we're going to use the
continuous values to see the big picture and do Trend analyzes let's have an example now we're going to create a new
View using the big data source since we have more data and we're going to go to the table orders let's take the order
date just drag and drop it on the columns and then we're going to take one measure let's say the quantity drag and
drop it on the rows and now as you can see the order date is a discrete field and we have 5 years of that down but now
what we're going to do we're going to go to the order date right click on it and we want to see more details so just go
to the exact date over here and now as you can see Tableau did convert it automatically from discrete to
continuous value and we have it as a green pill and that's because we have a lot of order dates and Tableau try to
bring it all in one picture and you can see now the order date created an axis with a range of dates so having
continuous Fields you have all the data in one big picture and that's going to help you to find any Trend in your data
so now let's go and convert the order date to a discrete field so in order to do that we're going to go to the order
date right click on it and click on discrete as you can see now we just broke the chain and we broke the
visualizations into individual dates and now because of that we have the header and we have all the distinct values
inside our data so we have all the days all the months of the five years in one visual so that having the order day as a
discret we cannot really do any Trend analyzis over here because it's really huge visualization so after we converted
the order date from continuous to discret we lost the big picture and now it's really hard to do any Trend
analysis but now instead of doing Trend analyzis we can do now a deep dive details analyzes for each individual
dates in order to analyze a specific problem or scenario or to answer the question why do we have in the first
place a trend so you can check the value of each date individually and we usually use the bar visualizations for the
discret and the line visualizations for the continuous so let's change that I will go over here on the marks and
instead of automatic I will move it to bar so we have it now here as a bar and I'm
going to just duplicate this sheet and bring the order date as a continuous and then change the
visualizations to automatic and now I just moved both of the views into One dashboard in order to see the
differences between continuous and discret so as you can see with the continuous if you want to make like
Trend analyzes seeing the big picture or you going to make like a report for the management without showing a lot of
details then go and use the continuous field and now if you look at the visualizations with the discrete fields
you can use that if the task or the requirement is to do deep dive analysis in the data and evaluate each data
individually so the main purpose of having discret is to do detailed analyzes where the purpose of continuous
values is to do Trend analyzes all right so now let's have a summary where we're going to compare
both of the discrete and continuous side byid in order to understand the differences between them let's start
with the definitions discrete values are disconnected separated Val values and continuous values are connected unbroken
chain of values for example in discret between 0 and 10 we have finite number of values we have exactly 11 values and
in continuous between one and two we have infinite number of values next one is about the colors discrete fields are
the blue pills and continuous fields are the green pills moving on to filters discrete Fields generate filters with a
distinct list of all values available in the data set and in the other hand the prous Fields generate a range filter
that has start and end values and next point is about the views discrete Fields can generate the header of the view
showing all possible values and the continuous Fields generate the axis of the view again it's like range of values
then we have sorting you can use discrete fields to sort your data using different options but if you sort your
data using continuous Fields you're going to have very limited options we have only ascending or descending and
finally we're going to talk about thep purposes the main purpose of the discrete is to analyze a specific
scenario like you are doing a deep dive analysis in a specific issue but the main purpose of the continuous is to
understand the big picture from the data in order to do for example Trend analyzes of your data so these are the
main differences between discret and continuous Fields all right guys so now what I'm
going to show you is how those different metadata Concepts like data types dimensions and measures discret and
continuous are related to each other all right so now we have a field in our data and in Tableau we can assign it to
different data types so it could be string or poon with true and false or a date and we have as well date and time
or a number whether it's whole or decimal and now next TBL can assign it to another metadata info either
Dimension or measure any data type that is not a number it's going to be Dimension so string buan and date all of
them going to be automatically dimension cannot convert it to a measure and if the data type is number we could have it
as a measure or Dimension if it makes sense to do aggregation and next T going to assign this field to the third
metadata concept discrete or continuous if we have a dimension field with a data type string it could be only discrete we
cannot convert it to continuous like in our data set we have the category the first name the country all those fields
are string Dimension and discret you cannot change it to anything else the same goes for the data type buan it
could be only Dimension and and only discret but now if we have a dimension filled with a data type date or date
time as you saw in our examples it could be continuous or discret we can have both and now to the last one if we have
a field with a data type number it doesn't matter whether it's Dimension or measure we can have this field as
continuous and as well as discrete all right guys so with this you have big picture for all those confusing Concepts
in metadata in Tableau all right everyone so we have now better understanding about the data types and
roles in Tableau and these important Concepts and in the next section we will learn about renaming and aliases in
Tableau how to rename things in Tableau as we are preparing our data sources what we usually do is that we're going
to go and rename stuff like renaming tables columns and even give ilas to our data so first I'm going to introduce you
to the different naming conventions that each developer should know and after that you're going to learn the different
techniques on how to rename fields and tables in Tableau and at the end you're going to learn the different method on
how to add aliases to your data in Tableau so let's start first by learning the different naming conventions and
what are the differences between them so now let's go sometimes in real life projects the
source of your data might contain technical or unfriendly names and when you are creating visualizations for the
users or your colleagues you have to make sure that you are using friendly names that are easy to understand and to
read and that's why after you connect your data to Tableau Data sources Tableau will start cleaning up and
renaming the fields and the tables to more friendly format and the format is following specific naming convention
that is decided from the Tableau team which is really great so let's understand first what is naming
convention naming conventions are set of rules and guidelines that could be used in order to give names for things like
tables Fields functions and variables in consistent and understandable way let's say for example we have the two words
hello word in order to create a naming convention we have to decide in two things first the word itself how we
going to write it here we have three ways we can use the lower case or we can decide to go with the uppercase or we
could use the capital letters and the second thing to decide is the separator between words so between hello and word
we have here white space here we have different options you could use dots uncore FLH Whit space or even nothing so
now for example let's say we're going to go with the lowercase and the separator underscore then we're going to have the
following name hellcore world so with that we have a naming convention that we're going to follow through all the
projects and it's really easy to follow and at the same time it's very important to decide on the naming convention for
your data model especially at the start of your project and if you don't do that I promise you the look and feeling of
your visualizations and dashboard going to look really bad and the whole project going to look unprofessional and
inconsistent and one more thing project team decides on different naming conventions so there is no really right
and wrong here all right everyone so now I'm going to walk you through the most common
naming conventions used in programming languages the first naming convention is the snake
case k is going to use the lower case in all the words and going to separate them using the underscore so the name at the
end is going to look like snake all right so our example going to be the customer name and we're going to work
with this table to fill all the different naming conventions an example of the output the rules for the lit case
and the separators and in which applications and programming languages we can find this rule where we're going
to start with the snake case the letter case going to be here lower case and the separator going to be the underscore so
if we follow those rules with the example we're going to have a lowercase customer
underscore name and we can find those formats in Python PHP and Ruby so the snake format is really easy and popular
and you can find it like almost everywhere and now we're going to talk about the next naming convention we have
the camel case and here we have another naming convention that looks like an animal so
in the camel case only the first word going to be lowercase but then all the following words going to be capitalized
and between the words there is nothing no separators no dots underscores dashes or anything so at the end we're going to
have the shape of camel all right so that means we have the second naming convention we have the camel case the
rule for the letter K is going to be the following the first words going to be lower and the rest of the words going to
be capitalized for the second rule we have the separation there is no separation there is nothing between the
words so here we're going to write no separation so now if you apply those two rules in our example the customer name
we're going to have the following output so the first one going to be everything lowercase
customer there is no separations that means we're going to start immediately with the second word but the second word
going to be capitalized so it's going to be name like this and we can see that Camel case is widely used in programming
languages like Java JavaScript and typescripts okay so that means we have the third naming convention we have the
the Pascal case it's very similar to the camel case so the rule says all the words going to be capitalized so here we
have capitalized and the separations there is no separation like the camel case so there is nothing so if you
follow those two rules on the customer name we're going to have the following outputs so the first word going to be
customer capitalized no oparation then a capitalized name and we can find this naming convention the Pascal case is
used in programming languages like Java and c I like this naming convention I used it in many
projects all right the next naming convention going to be the Kebab case and I think by now the one who
named those naming conventions should be an Arabic dude as you can see we have all the words are lower cased in the
skewer and separated with dashes so the name going to look like a delicious hot kebab skewer so now the fourth one we
have the Kebab case and the rule going to say okay the L case going to be lowercased like the snake case and the
separation going to be here the dash so if we follow those two rules on the customer name in our example we going to
have the foll output it's really easy going to be customer or lower then a dash then name and if you are web
developer or designer I think you know about this naming convention because it is widely used in HTML and CSS I think
it's like the Snak casee it's really easy to follow and now we have another naming
convention this one is very important and we call it a title case it has nothing to do with animals or Foods
sadly so we have here title case they're all going to say okay the word's going to be capitalized and we're going to
separate the words with a white space so here we're going to have space so now if you follow those two rules in our
example we're going to have capitalized customer then space then capitalized name like this so why it's important
because this one is the naming convention that Tableau team did decide to go with so you can see this naming
convention in Tableau so Tableau currently is enforcing this naming convention in all your data so once you
connect your data to Tableau Tableau going to clean up and rename everything following this rule well if you look at
it it's really friendly and easy to read but sometimes in projects we are forced or we are following some requirements to
follow a specific naming convention which doesn't match with the title case then the situation is really bad you
have to go and read name everything again and of course you don't have to follow one of those naming conventions
you can make your own rules and guidelines so for example let's say this is my namic convention and the letter
case let's say it's capitalized and I would like to separate the words with the underscore so I'm just mixing stuff
around so if I apply those rules to the customer names we're going to have something like this so capitalized
customer underscore capitalized name and with that we have defined our naming convention all right so now let's check
the naming conventions in our data sets and as well in Tableau so now if you go through the data sets that Ive prepared
for this course the small and the big one you can see that I'm always following the same naming convention the
letters going to be capitalized and going to be separated with an underscore so for example in the orders we have the
products underscore ID or if you go to the customers you can see the first underscore name and so on so I'm always
following the same naming convention all right so now let's check how Tableau did rename our fields and tables from the
data sets you can check those informations either from the worksheet or in the data source page but in the
data source page you can find more informations so now we are at the data source page let's go to the metadata
grid and here it's really interesting we're going to find two field names we have here the field name and the remote
field name so what are the differences between them well the information in the remote field names comes from the
original data sets and as you saw the original data set is following the naming Convention of having underscore
between two words and we have all the words capitalized so we have for example the order _ ID customer _ ID and so on
so all informations we find under the remote field names comes from the original data set from the original
Source system but now the field name on the left side over here those informations comes from Tableau after
renaming and cleaning up our Fields so if you take closer look to those names you can see they are following the title
case where we have capitalized words and separated by a white space so you can see over here we have the product space
ID where the original name was productor ID so here Tableau did rename our Fields so here it's really cool we have in the
Met grid a mapping between the old values the remote fi names and the new ones after Tableau did rename them so we
have always a data lineage between Tableau and our data sets as I said there is no right and wrong
here but it's very important to define those rules at the start of the projects before you start building any
visualizations and I remember one project where we started immediately with building the dashboard and
visualizations without deciding first on the naming conventions so we build around 30 dashboards in Tableau and
after a while of course we found out that the developers are using different naming conventions which is really
normal if you don't Define the guidelines and the rules at the start of the project
then everyone going to Mak their own style so we end up having a lot of dashboards with different rules and the
users were not happy about it at all so then we decided in the namic conventions and of course we were too late for that
then we spent a lot of time renaming the data set checking the report and so on so if you don't decide at the start of
the project especially if you have like a big project on the nameing convention then you can have really painful and
costly process of renaming everything from the scratch so make sure at the start to take enough time to talk to
your users and the project team to decide on the naming conventions and very important in the review process of
any new dashboards in dblo that to check that the namic conventions are followed in each workbook to be consistent in the
whole project all right so now let's say that you decided together with your users and
the project team on specific naming convention which is different from the one that Tableau uses so now the
question is how to rename in Tableau so in Tableau we can do the following changes on the table so we can rename
the table itself or we can rename the fields inside the table and the last one we even can change the values inside
these fields also known as aliases we going to talk about it in the next tutorial so in this tutorial we're going
to focus on renaming the fields and renaming the tables so first let's learn how to rename the fields in
Tableau all right so now we're going to learn how to rename fields in Tableau let's have the following task so the
task says rename our fields in Tableau following the naming convention Pascal case so that means all the words are
capitalized and no separation between words all right so now the first question is on which page we can rename
our fields we can rename our Fields either in the worksheet page or in the data source page we're going to get the
same effect but I usually go to the data source page since there we can find more metadata informations about the fields
and tables and the second question is can we rename our Fields globally for the whole workbook for all worksheets
and as well can we do it locally for only one view well you can do both but renaming locally for only one view it's
a little bit tricky so now let's learn how to rename our Fields globally for the whole workbook for All Views in the
worksheet page okay so now let's go to the worksheet page over here then we're going to go to the datab Bane on the
left side we will rename the shipping dates and here we have three methods the first one is the drop-down so so what
we're going to do right click on it and then simply go to the rename so we're going to click on that and we're going
to rename it to the Pascal so I'm just going to remove the space between them then enter and that's it it's really
easy we just renamed the shipping dates and the second method is to use a shortcut so for example let's go to the
order date over here and hit F2 and with that we can edit the name so I'm just going to remove as well the space
between order and date and hit enter so as you might already noticed the position of the order date just changed
in the datab Bane and that because the fields in the database are sorted in alphabetical order so that was the
second method using the F2 using the shortcut and the third method to rename the fields in the worksheet page is to
click and hold so for example let's go to the unit price over here lify click and hold then release as you can see we
can now edit the name so this is the third one I'm just going to remove the space between them and hit enter so
that's it those are the three method of renaming the fields in the worksheet drop down a shortcut using F2 and click
and hold and one more thing about renaming unlike the aliases which we're going to learn later can rename any type
of fields so whether it's Dimension measure continuous discret any type we can rename it so there is no restriction
or whatever for renaming in Tableau all right so now let's go to the next one we're going to rename the fields in the
data source page so let's go to the data source page over here and here we have two places where we can rename stuff
either at the metadata grids or at the data grid and here we have only two methods to rename stuff so the first one
is going to be the drop down like the worksheet page so let's go to the name for example the order date right click
on it and then rename so we're going to remove the space between them and that's it and the second method to rename
fields in the data source page is by double clicking so for example let's go over here on the metadata grids to the
customer ID and just double click on it and now we can go and as well we're going to remove the space so that's it
this is how we can rename in the data source page we have only two methods the drop down and the double click here we
don't have sadly any shortcuts all right so now we have the following scenario where we have renamed the fields like
several times and we forgot the original names of the fields so in this case we can reset everything back to the
original names and we can do that either at the data source page or at the worksheet page let's see how we can do
it on the data source page so if you just go to the field for example the customer ID right click on it then here
we have the option reset name so let's click on that so as you can see now we are back to the original name of the
field I found it really strange because I would like as well to have the option of resetting to the Tableau naming
convention so now let's see how we can do that on the worksheet page I'm going to switch back and then go to the datab
Bane let's pick the order dates and now we're going to go and edit the field again so right click on it and then
rename then you can see over here a very small icon to reset to the original name by clicking on it we reset the field to
the original field name all right so now let's say that you have a lot of fields and you want to reset all of them now
instead of resetting them one by one we can do multi selection and then do reset and we can do that at a data source page
so let's switch there and here it doesn't matter whether you're going to work with the metadata Grid or at the
data grid so now what we're going to do we're going to go to the order ID click on it and then hold control select the
next one and then we're going to select the unit price as well then right click and reset names once you do that you're
going to reset all of them which is really nice so we have the unit price reseted the shipping dates and as well
the order dates all right so now we have the following scenario where you are in the project and you build or ready a
view but afterward you decided to do renaming so what can happen to our view if we do renaming so for example here in
the view we have the order uncore ID and we want to rename it back to the Tableau name so we're going to go to the order
ID F2 and then instead of underscore I'm just going to leave it as a white space so as you can see in the view Tableau
did change the names automatically to the new name well you might say okay and what this is expected if I change the
name of the data source it's going to change as well in the visualizations well this is only in Tableau if you're
are using any other tools like power pi and you do renaming at the data sets the whole visualization going to break so
here if you have the task of renaming this going to happen fast in Tableau but in powerbi projects it's going to be
really painful all right so so far we have learned how to rename the fields globally for the whole workbook now the
question is how to rename locally for only one View and here it depends on the field roles discrete and continuous so
let's start now with the continuous as we learned before the continuous can generate the access of the view so so
here in this example as you can see the quantity and sales are the green builds that means they are continuous and they
generated the access of the view now to rename the quantity over here and the sales it's really easy what we're going
to do we will go over here on the axis right click on it and then go to edit axis let's go there then here we have a
new window and if you go over here you can see the access titles and the current title is quantity so let's go to
the field over here and change it from quantity to quantities then let's close this and as you can see now the field
name called quantities on the axis and if we check the datab ban over here the field stays as quantity so we did this
change only locally at this View and this is really easy for the continuous but the tricky part is if we have a
discrete field for example the order ID over here is discretes we have the blue pills so this one going to be tricky so
now we're going to change the name from order ID to orders so what we're going to do we're going to go to the blue pill
over here at the rows and double click on it double forward dashes write the word orders then press shift enter and
that's it go outside just click here in the white space and as you can see now we have renamed it to orders and as
we'll hear in the view but we didn't change the global name it stays as order ID here at the data pane so this is how
we rename the discrete Fields locally at one view so it was not really clear it's like tricky but let me show you how I
usually do it let's take another field the category over here we're going to change it from category to categories so
what I usually do I go over here and double click on it and just I copy the name then I go to any text editor and
paste the name name then before it we're going to have the new line then double dashes and we're going to have the new
name categories and that's it so then I'm going to copy it from here and go back to Tableau then I go again inside
the category over here double click on it then I remove this part and just paste the new stuff then enter so that
said this is how I usually do it for the discrete Fields I go to the text editor and prepare there since it's more clear
for me what I'm writing all right so now we have learned all different methods of renaming fields in Tableau at the data
source page the worksheet page globally and locally all right so now we're going to
move to the next points where we're going to rename the tables in Tableau and here again we can do the changes
either at the data source page or at the worksheet page using the same methods as renaming fields and the next point about
locally and globally you can change the names only globally so anything you do it's going to affect all the views which
is not really critical as the field names so now let's see how we can do it at the worksheet page so we're going to
stay with a small data source over here and let's minimize everything so we see the table names so you might already
notice that on the names we have CSV and that's because our data set comes from CSV files which is not really useful
information to see it at the data source so we can go and clean up the name and rename it to only for example customers
so we can go to the name over here right click on it and then click rename so I'm going to rename it to only customers and
the next one we're going to use the second methods using the short cut F2 so let's hit F2 and remove the SV parts we
have only the orders and we're going to use the third methods for the products just click and hold then remove the CSV
parts and that's it those are the three methods for renaming tables at the worksheet page now let's do the changes
for the big data source at the data source page so let's switch there we're going to go to the data source page and
here you have two places to change the table names either at the data model or at the metadata grid so we cannot go to
the data grid to rename tables so first let's switch to the big data source I'm going to go over here then big data
source so let's change the orders at the data model so here we have only one methods right click on it and rename so
we're going to remove the CSV parts and then we go to the customers over here then let's go to the metadata grid and
as you can see just click over here and you can remove the CSV parts so that's it and now for the last one we have to
rename the product so we can go over here and select the product and then we going to rename it in the data source
page so so that's it so this is how you rename the tables at the data source page we have the data model and the
metad grid so with that you have learned all the possible methods on how to rename tables in
Tableau let's first understand why and when we need Elias's in Tableau sometimes in Tableau projects we Face
the following situations the first one is when we have a poor data quality in our data sets CR data tyo or
inconsistent values so we have some how to clean up our data before we start building our visualizations for examples
we have the following scenario on the table customers we have bad data quality inside the field country so here we have
a tyo sometimes it's Germany sometimes it's deutchland sometimes the call it USA and then America so the data quality
is really bad in this table so here we have to do something about this and clean up the data and here we have two
options either we go back to the original data sets and do the changes on the values and the second option we can
do the changes directly in tavau using aliases so how we're going to clean this up we're going to remove the E from here
the typo and then instead of deut we're going to have Germany and in C of America we going to have USA and we
might have another situation where the data quality is good but the names are too long and if you are building views
you will understand that everything is tight and you don't have enough spaces to show the whole values of the
dimensions that's why we end up most of the time changing the values of the dimensions to Shorter names to
abbreviations so for example instead of having the value Germany we're going to have de instead of USA
us and here f r de e and us and here again we have the same situation either we're going to go back to the original
data set and change the values or we stay at Tableau and do it directly there using aliases and in real projects you
cannot go each time back to the source system or to the original data sets and change the values there either you don't
have the time for that or you cannot do that that's why we end up always changing those values directly in
Tableau so ales in Tableau are alternate names for the member of a discrete Dimension field so that that their
labels appears differently in the view as you might notice I say it's discrete Dimension field and that's because
Tableau does not allow you to create aliases for measures or for continuous Dimensions so in Tableau you can create
aliases only for the fields with the role discrete Dimension and now as usual we have the questions on which page we
can create aliases well only on the worksheet page we can create the aliases in Tableau and we cannot create it in
the data source page and the second question can we create aliases globally for the whole workbook all the views and
as well locally for only one View and the answer for that we can create aliases only globally that going to
affect the whole workbook all visualizations so we cannot create LSS locally for only one view okay so we're
going to go to the worksheet page we cannot do it at the data source page we're going to stay at the small data
source let's take the countries drag and drop it over here on the rows and then let's take any measure let's take the
scores drag and drop it on the columns so the task here instead of having those values France Germany USA we want to
have short names so here we have two methods to create alas in Tableau the first one is to go to the datab Bane on
the left side so let's go to the field country over here right click on it and then here we have the option aliases so
let's go there and here we're going to get a new window to edit the aliases so let's check what we can see over here so
in the middle we have three columns we have members has aliases and value of the aliases the first one we're going to
see all the members of the dimension country those values comes directly from the data sets so those are are the
original values from the source then the next one we has has aliases it is like an indicator to show us whether the
values in the view going to come from the original values or from the aases and now it's all empty because we didn't
add any aases and the Third Field we have the aases here we can go and edit the aliases of each member individually
and as you can see now the aliases are exactly identical to the original values that's why we don't have any aliases so
now let's go and change that instead of France we're going to have FR fr and then instead of Germany we're going to
have the E and as you can see as I'm adding a different values in the aliases from the original values tblo going to
mark it as a star so now let's go for the last one and we're going to have it as us and now just check what going to
happen once I click okay you see here we have the old values and if I click okay it switches to the aases and that's it
this is how you can add aases in the data pane but now let's say that you change your mind later and you don't
want to use the aliases and instead of that you want to go back to the original values so how we can do that maybe
already saw it so let's go back to the country over here on the datab ban right click we go again to the aliases and
while editing the aliases there is here an option called clear aliases so what you can do you can go over here and just
click on it and everything going to reset to the original values and as you can see those indicators did vanish that
means there is no aliases so now if you go and hit okay the value is going to go back to the original values from the
data sets and here what I usually do once I need aliases in Tableau I don't go directly to one field and change the
values but instead of that I tend always to create a new duplicate of the field and only change the values of the new
fields that I have created so let me show you what I mean so we go to the country then right click and then we go
to the option over here duplicate so let's do that and as you can see now we have another field called country with
the Kobe and of course now from the name I can understand this is Kobe and the other one is the original but in Tableau
if you look very closely to that data type icon you can see that in the douat we have like an equal size sign this
sign indicates that this field is not original one but it is Created from another original field so if you see the
sign that means this is a customized field that we have created so what I usually do I go and rename it so we're
going to call it country short and now I create the aliases on this new field so let's go and do that right click aliases
and then instead of France FR FR de and us so with that I have the two options the long one the original one and as
well the short version of the country and I can decide in each visualizations whether I'm going to use the short
version or the long version all right so that's all for the first method where we created aliases from the left side from
the datab Bane and now we're going to go to the second methods where you can create aliases directly from the view so
let's see how we can do that just move over the value France over here and right click on it and then here we have
the option edit alas so let's select that and now here I have very simple window I just have to edit the alas of
only France so I'm giving the alas only for one value let's do that so f r and then hit okay and as you can see in the
view now we just changed the value France to F FR quickly from the visualization and we can do the same for
Germany so right click on the value then edit aliases again the same window we're going to say de and okay and as well the
value change directly in the view so this is really quick methods to edit the aliases directly in the view and now if
we go and check the dimension country in the datab ban so let's check the alias is as you can see the member France and
Germany has an ilas f r andde and we done that directly from the view so now the question which method to use I would
say if you want to change multiple values go to the datab ban and do the changes it's just easier to work with
the window and add all those values but if you want to change a single value from the dimension then you can do it
quickly by going to the view and edit the Alias and that's all for the aliases this is really great way how to clean up
how to change the values directly in Tableau without having you going back back to the original data sets and doing
the changes there all right so now we have the following Tableau task for you the task says abbreviate the values
inside the field category in the table products from the big data sets showing only the first character from each value
you can B the video right now to do the task then resume it once you are done all right so now let's do that quickly
as I showed you before first we start with duplicating the field so I'm going to go and do that then I'm going to
rename it to category short then I'm going to present both of the values so category and category shorts
so far both of the dimensions has exactly the same values we didn't change anything now we're going to go to the
category short right click on it and then we're going to go to the aliases the task says the first character the
first letter from each value so that means the first one going to be F the second one it could be o or Os s so I'm
going to leave it as o and the third one going to be T then click okay and that's it now we have New Dimensions that has
only the first character of each value and we have done that using the aliases this is really easy all right guys so
with that we have completed this section which is really important step in order to prepare our data sets before we start
building our visualizations in the next section we will learn how to organize and structure our data in
Tableau how to organize your data in Tableau in Tableau we have different techniques and methods on how to group
up and organize your data which is very important for your users to understand your data so first you're going to learn
how to organize the dimensions in hierarchies and after that you're going to learn how to group up the members of
Dimensions using groups moving on we're going to learn how to Cluster your data into different groups using the cluster
group and after that you're going to learn how to split your data into two subsets using sets and then we have
another method called Bens in order to group up the values of the measures in order to build histograms so let's start
with the fth methods of organizing our data using hierarchies so now let's go [Music]
all right guys so the best way to understand the hierarchy is to have an example if you take a look to our data
for example the customers you can find some dimensions are related to each others since they hold similar
informations for example the dimension country we have values like Germany USA and France and we have another dimension
City where you can find the cities inside those countries so for Germany we have Berlin stutgart and then we have a
third dimension booster code where you can find the codes inside those cities so as you can see these three dimensions
are describing a common information they give us informations about the user location and we can relate those
Dimensions together using the hierarchy in hierarchies we have different levels and we start with the top node and we
call it the root node this node represents the highest level of aggregations in our hierarchy and now
we're going to go to the next level of the hierarchy where we have the country and in this level we're going to see
more details about our data where we have for example the two values USA and Germany and the links between the nodes
we call it branches and now we're going to go to the next level in our hierarchy we have the level two City so here in
the city we will see more details about our data so in USA we have Portland and Seattle and in Germany we have stutgart
and Berlin and again we have the link between the parent node and the child node using the branches and now we're
going to go to the last level in the hierarchy we have the postal code and here we're going to split the structure
Furthermore with more details so we have the following postal codes for each cities and now since the postal code is
the last level in our hierarchy and those value don't have any children we call those nodes as the leaf nodes the
leaf nodes or the leaves they represents the most detailed level of our data in this hierarchy so now with that we have
the complete structure of our hierarchy and as you can see it looks like a tree structure the top node we call it the
root node it represent the highest level of the details the we have the intermediate levels and they are
connected using branches and the last level we call it Leaf NES where it represents the lowest level of details
so we have the road node it represents the highest level of the aggregations then we have intermediate levels
connected with the branches and then we have the leaves the leaf nodes they represents the lowest levels of details
in our data so as we learned before we can do many olab operations on the cube so if we have here ACH key in our data
we can do two very important operations that drill down and the drill up the drill down and drill up they are olap
operations that's going to help us to navigate through the hierarchy in order to gain deeper or higher level
understanding of the data so let's understand first how the drill down Works let's say that we are working with
the major sales we start on the top node on the highest level so at the highest level we're going to have the total
sales in the whole data sets for example it's going to be 140 so now we are at the highest level at the root node and
if you use drill down you're going to jump to the next lower level in the hierarchy so that means at this level
we're going to see more details about the sales so for USA we have 90 and for Germany we have 50 and now if you want
to see more details about your data we can to apply again drill down in order to jump to the next lower level in the
structure so what's going to happen we're going to go to the level two and here the sales going to split between
Portland and Seattle we have 40 and 50 and for Germany we're going to have 204 studart and 30 for Berlin so that means
we are seeing more details about our sales and now if you want to go to to the lowest level to the leaves we going
to drill down from the city to postal code so it's going to look like this the Portland going to split between those
two poal codes Seattle going to be the same because we have only one child the same for Star it's going to stay 20 and
Berlin we have two postal codes so it's going to split again so as you can see we are using drill down to navigate
through the hierarchy by taking us from higher level to lower level of details it's like we are expanding the tree to
see more details to understand our data all right so now we're going to talk about the second Olive operation the
drill up it's exactly the opposite of drill down drill up going to take us from bottom to top from lower to higher
level of details so how it works let's say we're going to start at the leaves and we going to have the sales of those
leaves and now we can use a drill up to move from the postal code to the city so for example we're going to have the
total sales in Berlin 30 because it's the sum of 10 plus 20 and then in studart going to stay the same 20
Seattle 50 and Portland as well going to sum up the values from the leaves so we're going to have the value of 40 so
as you can see as as we are moving higher the value is going to get more aggregated let's say that we want to
jump to the country so we can use again a drill up to move from the city to the countries so for Germany we're going to
have the total sales of 50 and for USA we're going to have the total sales of 90 and now you can use again drill up to
go to the root node where you're going to have the highest level of aggregations so we're going to have the
value of 140 the total sales inside our data sets so as you can see if we have a hierarchy structure we can use a drill
up and drill down to navigate through the hierarchy structure so hierarchies organize and structure the member of the
dimensions into a logical tree structure by grouping similar Dimensions together hierarchies are really important and
give Dynamics to your views where you can have the big picture and understand the data at the highest level and you
can drill down to specific details to gain deeper knowledge about your data all right guys so now we are back
to Tableau let's understand how we can create hierarchies in Tableau we can create hierarchies only on the worksheet
page we cannot create it at the data source page and in the worksheet page we can create hierarchy on the data Bane
page and if you take a look to the customer tables you can find that we already have a hierarchy and here we
have small icon that indicates we have a hierarchy the hierarchy name called country City and on the left side over
here we have small Arrow if we click on it the hierarchy can to expand and we can see the dimensions inside this
hierarchy speaking about Dimensions hierarchies could be used only four dimensions you cannot create a hierarchy
from measures and this hierarchy that we have over here it is created automatically from Tableau since Tableau
analyze the content of the country and the city and automatically understood that there is hierarchy between them but
since we want to learn how to create a hierarchy we're going to go and remove it and create a new one from the scratch
so now in order to remove a hierarchy you go to the hierarchy name over here right click on it and then here we have
the option remove hierarchy here you have to understand that the dimensions inside the hierarchies will not be
deleted deleted only the hierarchy itself will be deleted so you will not lose any Fields Only The Logical tree
The Logical hierarchy will be removed all right so now let's see how we can create hierarchy in Tableau and we're
going to create the location hierarchy we're going to go to the left side to the datab Bane and we're going to select
one of the dimensions it doesn't matter which one you're going to select but I prefer to start with the highest level
of the hierarchy so here in our example it's going to be the country so select the country right to click on it and
then here we have something called hierarchy and we're going to select create hierarchy so let's go there we
have to give it a name so we're going to call it location hierarchy and then hit okay as you can see now on the left side
we have the icon of the hierarchy and inside it we have only one dimension the country now in our hierarchy we have as
well the city and the postal code so how we can add it to this hierarchy as we learned the hierarchy has different
levels and the Order of those levels are really important so we have country City and postal code so now in order to add
the city we just going to drag and drop the city beneath the country over here and release it so with that we have now
the city inside our hierarchy let's grab as well the postal code so we have to drag and drop it beneath the city let's
release and with that we have created the location hierarchy with the three dimensions country City and postal code
so here again if you want to hide the details about this hierarchy we can collapse it over here or if you want to
see the details we can expand the hierarchy all right so this is one way on how to create hierarchy in Tableau by
using drop down the second way on how to create hery key we can quickly drag and drop Dimensions together so for example
if we go to the products table we have as well a hierarchy here between the category product name and subcategory so
our hierarchy starts with the category then the subcategory and the last one that leaves going to be the product name
so now let's see how we can create the hierarchy using quickly drag and drop we're going to take one of those
Dimensions let's say we're going to start with the category drag and drop it inside the subcategory so I'm now
hovering and selecting the subcategory let's release once we do that tblo understand that we want to connect those
Dimensions so tblo going to create a new hierarchy we're going to call it the product
hierarchy and let's hit okay and now let's see on the left side we have new hierarchy called Product hierarchy with
the icon and we have insided two Dimensions category and subcategory we are missing the third dimension let's
take the product name and drop it in the hierarchy so now we have problem with that the order of the dimensions inside
our hierarchy is wrong because because the dimension category should be the level one and the subcategory should be
the level two so how we can fix that just select the category and drag and drop it on top of the subcategory let's
release that and that's it this is how you change the order of the categories and with that we have the product
hierarchy all right so now let's say that we want not to remove the whole hierarchy we just want to remove one
member one dimension from the hierarchy so in order to do that let's say we want to remove the product name select it and
just drag and drop it somewhere here in the empty space and with that the product name is not anymore member of
the hierarchy so this is how we can remove Dimensions from hierarchy but I want to put them back in our hierarchy
because we need it later so I will put the subcategory beneath the category and we take the product name and put it
beneath the subcategory and that's it so these are the two methods of creating hierarchies in Tableau either by drop
down menu or by quickly drag and drop the dimensions together in order to create the hierarchy it's really
easy all right so now we have this hierarchy this structure how we're going to use it inside our view it's really
easy we're going to go and select the whole hierarchy then drag and drop it to the view so here the hierarchy going to
start from the level one for the countries and we're going to see the values of the country and now let's have
one of those measures we're going to take the sales and drag and R it on the columns so now if you look closely to
the country to the blue pill over here you can see that we have a new sign the plus sign this sign indicates that we
can drill down in this Dimension so now let's go and click on the plus sign as you can see now we are drilling down in
our hierarchy to a lower level so now we are seeing more details about the sales and we are now at the level of the city
to the next level so now as you can see we have the dimension City in our rows we didn't drag and drop it from the
datab ban and put it at the rows it expanded from the hierarchy and again here the city has the plus sign that
indicates we can drill down inside the city so let's drill down again so as you can see now we are at the postal code
and we can see more details about the sales and now if you check the postal code there is no plus sign like the city
and the country because we are at the leaves we are at the lowest level of details in our data so with that we have
navigated through our hierarchy from the top node to the leaves as you can see it's really easy and very Dynamic so now
let's say that we are at the leaves and we want to drill up back to the highest level of the aggregations back to the
top node it's really easy if you check again the city and the countries we don't have anymore the plus sign we have
the minus sign the minus sign indicates that we can drill up in the hierarchy so let's see what can happen if you click
on the minus sign as you can see we drill up now from the leaves from the postal code back to the city and the
values of those sales are now more aggregated and now the same thing if you want to drill up from the city back to
the country we're going to click on the minus sign so let's do that and with that we are moved to the level one to
the highest aggregation in our hierarchy all right so so far what we have done is we drill up and drill down in our
hierarchy using the row shelves and you know that the rows and the columns we use use it as developers to build our
view so now the question is how our users and the audience going to drill up and drill down through the hierarchy
because the hierarchy should be as well used quickly from the users to drill down to the details so now let's see how
we can do that if we go to the view over here and hover on the country we can see again a plus sign so let's go and click
on that and as you can see we drill down in our hierarchy from the country to the city so now let's go more in details and
drill down to the postal codes we're going to hover on the city and as you can see see we have again the plus sign
so click on that and with that we drill down to the postal code so this is exactly how the users going to drill
down in the view so now if you want to drill up back to the higher level we can do the same we can see the minus sign
over here click on it and you go back to the city and then we go to the country as well we have the minus we click on
that and with that we drill up back to the country so as you can see with those icons we can navigate through our
hierarchy so now you might say all your users you know what this is really small icon and my users don't like it so if
there any other way to drill up and drill down in the view well yes if you go to any of those values over here and
right click on it you can see in this drop down we have a drill down so if you click on that we drill down to the city
the same if you select any value doesn't matter which one let's go over here and then drill down again and with that we
are at the postal code if you want to drill up you can do the same any values right click on it and here we have the
drill up so select that and to drill up back to the country go to any values in the country right to click on it and
drill up so those are the two ways on how to drill down and drill up in the view all right guys so so far we have
created our own hierarchies by putting those Dimensions together in different levels but in tblo we have as well
indirect embedded hierarchies in the data type date in Tableau any field with the data type date has the following
hierarchy it start with the highest level with the year then we have the quarter then month and then the lowest
level that leaves we have the days so those four levels are the default levels inside each Fields with the data type
date in our data sets and now we have another data type that holds as well an embedded indirect hierarchy we have the
fields with the date and time so here we have informations about the time and we have seven levels it start exactly like
the date so the highest level going to be the year then the quarter month and then the day but now we can drill down
to more details since we have the time information so the next level going to be the hour hour then we have minutes
and seconds and the seconds are the lowest level of details they are our leaves so here we have several levels of
the hierarchy so date and date and time they have hierarchy embedded inside it so now let's uncover those hierarchies
in Tableau all right so now we're going to go to the table orders and here we have two dates doesn't matter which one
both of them going to have exactly the same hierarchy so let's take the order date drag and drop it here on the rows
and now as you can see we have now the plus sign it indicates there is a hierarchy and it start at the highest
level with the years so now let's take a measure to see some data we're going to take the order counts and put it in the
columns and I want to show as well the labels so let's show some labels all right so now let's go and discover the
hierarchy inside the date as you can see on the left SES we don't see any informations about the hierarchy so that
mean it's really embedded inside this data type so let's go on the years and click on the plus sign to drill down as
you can see the next information we have the quarter informations so now we see the total number of orders by the
quarter so now we can see more details about the total counts and then we can drill down to the day and now we are at
the lowest level at the day we cannot drill down further to for example hours minutes and seconds because the order
date has the data type date so as you can see the dimension order date has four levels years quarter month and day
it's really nice to have it like this in Tableau because it's really standards I worked with other bi tools and there we
have to build it in our own which is really time consuming to build all those hierarchies especially if you have a big
data it so here in Tableau our life is easier Tableau did decide to have hierarchy inside each
date all right guys so one more thing about the heres they really organize and structure your views and make it more
Dynamic for the users so for example if you have the requirements to make sales by country sales by City sales by postal
code and you don't use hierarchies you will end up making three views like here on the left side so it takes a lot of
space and as well it's not really dynamic but better than that we can create hierarchy between those
dimensions and we can put everything in one View and then you give the options for the end users to drill down and
drill up depending on what they need so here if they want the sales by country we have it already at the top node but
if they want the sales by City all what they have to do is to drill down to the next level and we have it already sales
P City and if someone's need to go more in details to go to the postal code they can drill down as well to the sales by
postal code so as you can see it gives really your view more Dynamic and going to be more attra active for the end
users so if you compare to the lift sides now we have more Dynamic more interactive for the end users and as
well you are creating list views in your dashboards so this is really great so if you want to drill up back to the country
we can just click the minus sign so hierarchies gives more Dynamic it structure and organize your data in the
views all right guys so now let's summarize hierarchies organize and structure the members of the dimensions
into logical tree structure and hierarchies are special feature only for Dimensions you cannot create hierarchies
between measures and we can use drill down and drill up to navigate through our hierarchy to gain deeper or higher
level understanding of your data overall hierarchies are really important to organize and structure your data in the
views and it provides for the users a powerful tool to quickly and easily navigate and explore your data uncover
insights and make better decisions [Music] all right guys so so far we have learned
how to group up the dimensions together in hierarchies but now we will learn how to group up the values the members of
the dimension into groups and in Tableau we have three methods in order to do that so we have the groups cluster
groups and sets and now we will start with the first one how to group up the members of the dimensions using groups
but now as usual let's understand first the concept behind it and then we're going to learn how to build it in
Tableau so let's go all right so now if you take a look to our data sometimes you're going to find
Dimensions that could be used to categorize or to group up the data inside this table so for example if you
take a look to our product data you can find that the category can be used to group up the data so for example you can
see two products are assigned to the category Monitor and three products are assigned to the accessories so this
field could be used to group up the data and now if you check the customer data you can find some Dimensions that could
be used to group up the data for example the country the city the postal code those information could be used to group
up the customers so all those Dimensions could be used to group up our data so those groups or those Dimensions comes
directly from the data sets and we didn't create so far anything so sometimes we might be a situation where
we want to group up the data differently than the original groups in the data sets so here we have two options either
we go back to the original data sets and do the changes there and create the group or we can create the group
directly in Tableau without going back to the original data sets so for example we want to create a new group in the
products and it's going to be the product class so here we have another group and we going to call let's say for
example the first three are the class A and the last two are the class B so we can create this extra group
directly in Tableau the same thing goes for the customers we want to add a new group we want to add the continent
informations so we can add this group for Germany it going to be Europe for USA going to be North America and for
the rest France Germany USA it's going to be as well Europe so that's it all what you are doing now is adding new
groups to our data so the groups in Tableau combine similar related values into higher level categories which can
create a new dimension for your data analysis all right so now let's see how we can create groups in Tau and there is
two methods in order to do that either by creating the groups in the datab ban or directly in the view so we're going
to start with the first one where we're going to create the continent group in the data pane so in order to do that
we're going to go to the table customers and based on the values from the country we're going to create the new group and
here it's important to understand that we can create groups only on top of Dimensions so we cannot create groups on
the measures there is another feature where we can use it to group up the measures and we call it pens but now for
the groups we can create only on top of the dimensions and the new field going to be as well a dimension so let's see
how we can do that select the country right click on it and then let's go to the create and here we have the option
group so let's select that so now we're going to get a new window in order to create the group we're going to start
first by renaming the field name so we're going to call this continent and then in the middle over here tblo going
to list for you the distinct values inside the country so all possible values from the data set so what we're
going to do we're going to group up France Germany and Italy to Europe and USA to North America so how we're going
to do that we're going to multi select those values by clicking control so France Germany and Italy they are one
group so in order to group them together we're going to select over here the group so once we select it Tableau going
to put all those values underneath a new group so we're going to give it the name of Europe let's click okay and with that
we have created now a new group for those three values so as you can see we can expand and collapse those values to
see the details but still we have one more value inside the country that is not mapped yet to a group and here what
we're going to do we're going to select it and then click on the group and we're going to call it North America so that's
it now inside the continent we have two values Europe and North America and they are related to those members from the
country Dimension so now let's say that you want to move one of those members from One group to another group so how
we can do that it's really easy by just drag and drop so let's take for example Germany drag and drop it here in the
North America and you will see this member now is belongs to the group of North America which is wrong so I'm
going to put it back and that says this is how you switch between groups and here we have in table another option is
to remove the member from all groups in order to do that let's select Germany and click over here on group so once we
do that you will see that the Germany value is not assigned to any of those groups so if I here collapse those stuff
you will see that Germany is Standalone value we usually use the group other for all values that we couldn't assign to
any of our groups and here tblo gives us a quick way in order to create this group so all what you have to do is to
click the value Germany and then click over here include other so let's put that and as you can see now the value
Germany is inside the group other and with that we have in the continent three groups Europe North America and other
and now if you want to rename the groups you can click on the group and then click over here rename so we're going to
have it like other continent or something or right click on the group and then rename that's really easy so
now what we want to do is to move Germany back to Europe and now as you can see the group other did disappear
because it doesn't have any member so that's it for now we have created our groups let's click on okay and now as
you can see on the left side we have a new field called continent and it is discrete Dimension and it has a special
icon in the data type indicate that this field is a group and in Tableau if you're creating a group based on another
field with a geographic role Tableau going to show both of the icons group and Geographic role because usually the
group has the following icon so for this situation it's going to show both of the icons Geographic role and the group all
right so now let's build a view based on this new dimension we're going to take the continent drag and drop it here on
the roads as you you can see it has two values we're going to take the sales as well put it in the columns and now to
see more details in the view we're going to take another dimension or we're going to take the whole hierarchy of the
location so let's drag and drop it here on the row and now as you can see the continent is now grouping our data so
Europe for those three values North America for USA and as we learned in the hierarchies we can drill down to the
next values and you know what this new dimension the continent has similar informations to the country and city and
it belongs to the hierarchy so now it makes sense to add it to the structure of our location hierarchy so what you're
going to we're going to drag the continent and drop it on top of the country so with that the continent going
to be the level one and Country going to be the level two so we can use this new group as the highest level of
aggregation in our structure so we can drill up back to the continents so as you can see we can create a new groups
directly in Tableau without going back to the original data sets and do modification there all right so that's
about the first method on how to create groups in Tableau from the datab ban the second method is to create groups
directly in the view so let's see how we can do that we're going to create a new work sheet and we're going to take two
measures we're going to take the profit let's put it here on the rows and we're going to take as well the sales and now
we want to show all the customers as data points in order to do dot we're going to go to the customer ID drag and
drop it put it here on the marks on the details so now we have for each customer in our data set as a data point and now
our task is we want to group up the customers based on their performance and if you decide to go to the data p in
order to create those groups and right to click on it then we go to the groups you will see a long list list of all
customers and now creating groups based on those values can be really painful because the customer ID has high
cardinality compared to the country so instead of doing that here we will do it directly in the view in order to do that
we will go and select for example those customers those data points and we will get a new window so as you can see tblo
tell us there is eight items that are selected and we have the icon of the group so if we click on that tblo going
to be create few stuff so if you look to the data Bane over here on the left side you can see that Tableau did already
create a group with the selected items and it did as well the coloring so you can see the group as well here in the
colors and on the right side we have the Legends so you can see the selected item is the blue and the others are gray so
now what we have to do is to go and rename stuff so first of all I'm going to rename this group I'm going to call
it customer group and as you can see the group name is like the list of all members so it
says okay 91 33 five and more and that's because it's hard for Tableau to understand why did we select those
customers and what is the group name in order to rename the group we're going to go to the left side to the datab Bane
right click on it and then we go to edit group so select that and now as you can see over here we have our group that we
just selected with the eight members so let's go to the group name right click on it rename and we're going to call it
hi performers so that say those customers has the highest performance compared to all other customers so as
you can see Tableau did put all the other customers under the group other so let's click okay now and now we have a
better name on the right side and and it makes sense to have a gray color for other all right so now we're going to go
and create another group of customers with a low performance all right in order to do that we're going to do the
same we're going to go in the view and select those customers with the bad performance and once we do that we're
going to get this new window saying okay nine items and we're going to select the group but instead of that if you move
your mouse away you will see the window disappears so in this case we're going to go to one of those data points and
right click on it and then here we have the option of group so select that and now what can happen tblo will not create
a new group on the Bane it going to include it as a new group inside the already existing group so you can see
here on the right side we have new group with the color of orange and with that we have added a new group to the
customer in order to rename it we're going to go to the data Bane and edit the group so let's go there and now
instead of having the list of the members we going to right click on it rename and we're going to call it LW
performers let's click okay and now with that we have nice namings for the groups we can as well change the colors of the
group for example for the low performance we can have red for the high performance we can have green in order
to do that we're going to go to the marks over here to the colors click on that then we're going to select edit
colors as we said for the high performance so let's select this value and assign it to green and we want for
the low performance to have a red and the color of the other going to be gray since it's not our Focus so let's click
okay and as you can see now the data points has new colors and another use case for the groups it do we use it as
well as a filter so we give the users the possibility to interact with our views and to focus in specific group and
now in order to do that we're going to go to our data vein to the group right click on it and show filter so now we
have the group as a filter and the users can click between the groups to change their focus in which cluster they can
analyze and for example if they are not interested with all those great stuff and they want to compare the high
performance with the low performance to understand the difference Behavior between them they can just remove it
like this all right so this is how you can create groups in Tableau using the two methods either from the datab ban
especially if you have a dimension with a low cardinality like the country but if you have a dimension with high
cardinality like the customer ID order ID then you can create groups directly from the view which is really fast way
to assign the values to specific groups so as you can see this feature in Tableau the groups is really awesome way
on how to group up your data directly in Tableau without going back to the original data sets and create the group
there all right so now you have the following task for you go to the small data sets and create a new group called
classes based on the dimension product name the first three products belong to the class A and the last two products
belongs to the class B you can pause the video right now to do the task then resume it once you are done all right so
now let's quickly create this group we're going to check first the cardinality of the product name so I'm
just going to drag and drop it here in the rows and as you can see we have only five values so that means it has low
cardinality and we can do it directly in the datab ban so right click on the product name and then we're going to go
to the create group and now we're going to call it product class so we're going to go and call it
classes and the first three members are the class A and the last two members are the class B so that's it let's go okay
and now we can go and check the value so let's drag and drop it over here before the product name and as you can see the
three products are class A and the two products here are class B so that's it this is really
easy all right so now let's summarize groups in Tableau combin related similar values into high level categories and
groups can be created based only on Dimensions we cannot create groups from measures and the group itself going to
be a discrete Dimension so groups in Tableau are very useful to simplify your view and make it easier to understand
your data by grouping the data points into clear and relevant categories all right everyone so now
we're going to learn another method on how to group up the members the values of Dimensions into groups and this time
we're going to use the cluster groups in Tableau but as usual first let's understand the concept behind it then
we're going to learn how to build it in Tableau so let's go all right so cluster group is another
way of grouping your data used for data clustering which is a statistical technique to group up similar data
points together in data clustering we have different algorithm to calculate the clusters for example we have the
algorithm K means and another algorithm called hierarchical clustering and another one called density based
clustering and Tableau did decide to go with the K algorithm since it's really simple and easy to implement and the
Kean algorithm is widely used in data clustering and now let me show you how the key means algorithm Works let's say
that in our data set we have the following data points so first we have to Define how many clusters we want to
build so in this example we're going to go with three clusters and after that the algorithm going to pick three points
and we call them centroids and then it going to assign the data points to the nearest centroid so for this data point
it going to belong to the green cluster and then it going to go to the next data point and calculate the length between
it and the three centroids and then it's going to assign it to the nearest centroid for this it's going to be the
red cluster so the algorithm going to do that for all data points and assign them to the nearest centroid so at the end
we're going to have three clusters the green red and blue as you can see the key means is really simple and easy to
implement all right so now in order to understand the Clusters let's have the following
task the task says to identify high value customers by clustering them based on their sales and profits in order to
find out which customers generate the most revenue and which do not all right so now in order to create the cluster
group we have to be at the worksheet page and this time we can create the Clusters from the analytics pan and we
cannot do it at the data pane so now let's see how we can create the Clusters and we will stay with the big data
source since we need a lot of data points and here we need two measures we need the profit so let's drag and drop
it on the rows and we're going to take the sales as well to the columns and with that we have two aess the sales and
profit but what we are missing now in the middle is the customers data each customer going to be one point for that
we're going to take the customer ID and we're going to drag and drop it over here on the details on the marks all
right so now we have the data points and each point represents One customer so now in order to create the cluster we
going to switch to the analytics pane so let's go over there and if you go to the models you will find the cluster so it's
really easy we just drag and drop it here on the name clusters and here we will have a very simple window so here
it says the variables for the Clusters are the sales I improve it and then we have the number of clusters and here as
a default it going to be automatic that means Tableau going to figure out from the data how many clusters do we need
and here as a default we have automatic that means tblo going to figure out how many clusters it makes sense to create
from those data points so as you can see Tableau did already create a cluster and it created three clusters but if you say
you know what we want four clusters or five clusters you can go over here and Define how many clusters do you need so
if we have five let me just move it over here to see what is going on so we have now five clusters if you want to have
two clusters we will have only two colors and so on so I'm going to stay with the three clusters it makes sense
so that's it in this window there is no okay or something so we're just going to close it because Tableau going to create
the cluster immediately all right so now we have the cluster the question question is where do I find the cluster
Group Well if you go to the data Bane on the left side you will not find any cluster group over here because we have
this information now only on the colors so this field here is our cluster and now we might have this information this
cluster group in the data Bane in order to use it in different views so what we're going to do we can just drag it
and drop it somewhere in the datab Bane and now over here you can see we have a new field and the icon indicates that
this field is a cluster group so now we're going to give it the name customer clusters all right so now we can reuse
this cluster in different views if we need all right so now the next point is how we can edit our cluster so now we
have three clusters how about we want to change it to four how we can do it we will go to the marks over here right
click on it and here we have the option of edit clusters so let's select that we will get again the same window so in
order to change the number of clusters we will not do it at the data pane we're going to do it at the marks so this is
how you edit the Clusters now if you go over here again and click right click on the Clusters you can find we have
another option called describe clusters so here we're going to find more informations about our clusters so let's
select that so as you can see here we have a lot of informations about our clusters so first we have the input for
the algorithm or for the clustering algorithm so the variables are the measures that we used in our view so the
sum of profit the sum of sales and the next info is the level of details usually here we have the dimensions and
we are using now the lowest level of details that a customer ID since each data point represent a customer then we
have more informations about our clusters so the number of clusters we Define are three the number of data
points the number of customers we have 8800 customers and then we have the table over here for each cluster we have
informations like the number of items or the number of data points inside each cluster so in the cluster one we have
around 617 customers in the cluster two we have 171 and cluster 3 is the lowest we have 12 customers the centroids of
each cluster the Central points of clusters so if you need more statistics about our clusters we can find it inside
describe clusters all right guys so it's really fun to work with the Clusters and I found different people use different
designs on how to present the Clusters so for example one design that I see almost everywhere is that if you go to
the shapes over here and then choose the field Circle and now if you have a lot of data points what is interesting is
that to see the overlapping between those points but now it's really hard to see it in this view so what I'm going to
do is that I'm going to focus about those data points so let's select stuff and then we're going to say okay keep
only let's click on that we have now like a zoom in in those points so now in order to show those overlapping in
Better Way in better visual what we're going to do we're going to go to the colors and then we're going to reduce
the opacity so let's reduce it to something like 70% I think should be fine and now our
visualization will just look really professional and you can see the overlapping between data points all
right so there is another design in that to assign a shape for each cluster so before we do that I want to have again
the big picture of I will remove the filter so let's just remove the filter from here to somewhere else and with
that we are back to original view so what we're going to do is that we're going to take the cluster and put it on
the shapes so let's drag and drop the cluster on the marks over here on the shapes so as you can see for each
cluster we have a shape we have the plus square and circle and if you want to assign different shapes what you're
going to do is click on the shapes and now we can go over here and change the shape of cluster let's say instead of
Plus for the cluster threee we're going to have X and let's click okay and now instead of plus we have X's so this is
how I usually design the Clusters in Tableau all right so now after we create the Clusters it's really important to
interpret the outcomes of the Clusters with the business like in one hand we have the red cluster focus on the
customers with the high profits and in the other hand we have the blue cluster focus on the customers with the low
profits so clustering your customers based on the sales and profit can help you to gain insights about your
customers which can help the business to Target its marketing strategy very effectively all right so now we have the
following task for you the task say to identify the top selling products by clustering their products based on the
quantity and the profits create five clusters using the big data source you can pause the video right now to do the
task then resume it once you are done all right so now let's create the cluster for the products here we need
two measures we have the profit and the quantity so let's have first the profits we going to drag and drop it here in the
rows and then we're going to take the quantities on the columns and now we need the dimension to define the level
of details the data points and here we can use either the product ID or the product name so I will go now for the
product name so drag and drop it on the details all right so now we have everything we have the measures and the
dimension and we're going to go and create the cluster so we go to the analytics Pane and then we take the
cluster drag and drop it over here and TBL to create here only two clusters but the task says five clusters so we're
going to go over here and Define five all right so that's it now we have five clusters for the products let's close
this so clustering the products based on the quantity and the profits can help you to gain insights about the product
portfolio and the business can use it for many stuff for example to optimize the inventory management and make
strategic decisions about the product development and marketing so this is really
amazing all right so now let's summarize the cluster group in Tableau is a statistical technique to group up
similar data points together in clusters the cluster algorithm used in Tableau is the key means easy to implement and as
well easy to understand clustering in tableau is one of the main features and very powerful since tblo is the only
tool the only Pi tool that can plot endless amount of data points because other bi tools like powerbi they always
like make limitations on the number of the data points that you can see in the visualization which can make it really
impossible to create clusters in powerbi and data clustering in visualization is a very powerful tool for data analyzis
and patter recognitions to help the business and the organizations to be data driven which means to make better
decisions using the data on how to group up the members the values of Dimensions into groups but
this times we're going to use the sets in Tableau it is very similar to clusters and as usual we're going to
start first with the concepts then we're going to learn how to build it in Tableau so let's
go all right so now let's say that we have the following data points in our visualization we can use data sets to
group up those data points so sets can Define your data based on specific criteria or selection into two groups of
data the first group we call it the in group in this group you're going to find all the data points that are included in
the subsets of data these data points are the members of the set and the other group is the out group this group
contains all the data points that are not included in the subsets of the data so that means the data points in this
group are not the members of the set so the sets in Tableau divide our data into two groups the in and out groups so when
do we need sets and why it's important well we can use the subset of data to do Focus analysis in specific scenario and
as well to compare the subset with the remaining data for example we can make a subset of the top 10 customers in our
data sets based on the sales and compare the subsets with the remaining customers in order to understand their behavior
and what makes them on top 10 so it's really amazing feature in Tableau to understand your data and to make focus
analyzis on specific fix scenario and in Tau we have different ways to create the sets the first option is to create a
fixed set and that's by using a manual selection and the other way is to create a dynamic set based on specific criteria
and here we have two ways to create the dynamic set either using condition or using ranking top or bottom and now the
last method of creating sets in Tableau is by combining two sets and it can create new combined sets so since we are
combining data together it's like the joints here we have four options inner left right and full join and here the
output going to be new combined sets so that's it those are the different methods in order to create sets in
Tableau so let's have quickly some simple examples in order to understand those
methods all right so now back to our five customers and now we're going to create different sets using different
methods we're going to start with the first set it's going to be fixed sets using manual selection so here we're
going to go and manually select which customers are inside the subset and which customers are outside so here
we're assigning two values in and out so for example we're going to say John is inside the set and as well betar but the
rest going to be out so Martin George and Maria going to be outside of the set so as you can see we just manually
selected which customers are in the set so let's move to the second set where we're going to create a dynamic set
using a condition where the sales is bigger than 400 so here we will not select anything manually we will just
Define the rule for Tableau and and tblo going to do it automatically for us so tblo going to scan here all the
customers and start assigning the values in and out so the first customer is Maria does not fulfill the condition so
it's going to be out of the sets next we have the second customer joone he has high score so 900 it fulfilled the
condition so he is a member of the set the same goes for George 750 Martin as well but P don't have any score so he
does not fulfill the condition he will be out of this but Peter don't have any score so he does not fulfill the
condition better is out so using this condition we have three customers in and two are out so now what make Dynamic
sets very important and efficient at that let's say in the next days those scores of the customers did change so
what going to happen after you refresh your data in Tableau Tableau going to recalculate the condition and assign new
values if something changed so there is dynamic and everything going to be done automatically and now let's move to the
third one we have Dynamic sets and now we're going to use the top two customers which means the top two scores going to
be in inside the subsets and the is going to be out so if you have a look at the data you can see Joan and George has
the highest scores between the customers so those two customers going to be in and the rest going to be out and again
everything here Dynamic and automatic we just specify the rule and Tableau going to do the rest all right guys so those
are the three methods to create a set and next we're going to go more advanced where we're going to create a set from
combining two sets so here we're going to take the following example where we're going to create a new combined set
by combin combining set one and set three so here it's really important to understand that the calculation of this
new combined sets going to be based on the output from the set one and set three so Tableau will not check the
table customers it's going to check only the output from the sets and here we have to configure the combined sets and
we have four options it's something similar to the joints but not exactly like the joints so let's go through
those options one by one the first option says all members in both sets so that means the customer going to be a
member of the bined set if the customer is at least a member of one of those two groups so let's check our customers
Maria is not a member in set one and set three so it's going to be not as well a member of the combined group and the
next customer Joan is a member of both groups so that is more than enough so he going to be as well a member of the
combined set and George is a member of one of the sets so he going to be as well in Martin here again is like Maria
he's not a member of set one and set three so he going to be as well out and then the last customer better he is a
customer of one of those two groups so that's going to be enough to be a member in the combined sets so as you can see
with this option it's going to be enough for the customer to be a member of one of the two groups to be in the combined
group all right so now let's move to the next option it says shared member in both sets so that means to be a member
in the combined sets the customer should be a member of both sets so it's not like the first option it's enough for
the customer to be one of the sets the customer has to be in both sets so let's check our customers again Maria is not a
member of both sets so Maria going to be be out but next we have the customer John he is a member of both sets so that
means he fulfilled the requirements and John going to be a member of the combined set as well so now as you can
see for the other three customers none of them fulfill this requirements so that means none of those customers going
to be inside our set well this option is very restrictive all right so now let's move to the next one it going to says
set one accept shared members so what this means we're going to have all the members from the set one but they should
not be a member in the set three so let's check the customers Maria is not a member in both of them so she going to
be out and now we come to Joan Joan is a member of the set one but he is as well a member of the set three well this time
join will not be a member of this group because we are saying accept shared members so that's mean join this time
going to be out the next one George is not a member of the set one so automatically going to be out the same
goes for Martin he's not a member of the set one but now if you check better he is the only one that's fulfill this
requirements better is a member of the set one and not member of the set three and this is exactly the requirement for
this group so pet going to be a member of the set three and this is exactly the requirement of this option so only
better going to be a member of this group all right so now let's move to the last one it's exactly the opposite so it
says set three except shared members so the requirements for the customers to be a member of this combined group is to be
a member of the set three but not a member of the set one all right so now let's check our customers I really feel
bad for Maria she is not a member of any of those sets like if your name is Maria I'm really sorry for that it's not
intended but now it's really too late I already recorded so sorry for that next time I promise you I'm going to make
better examples but for now Maria is out as well in this group the same here goes for Jan Joan is a member of set three
but Joan is as well a member of set one so he does not fulfill the requirements John going to be out now if you look to
the customers George is the only one in the set three and not in the set one so only John going to be in this group and
the other two are out all right so with that we have covered all the scenarios all the methods that we have in the
Tableau sets all right guys so now let's see how we can create sets in Tableau we can
create it in the worksheet page we cannot do it at the data source page and we can do it either at a datab bane or
in the view so now we're going to create different sets using different methods but first let's create the view so we
need the customer ID by the way instead of drag and drop you can double click on the field and it going to be in the rows
we need as well the first name so double click on the first name and we would like to have the scores as well so drag
and drop the scores at the Abc so now we're going to create the fixed set using manual selection so in order to do
that we're going to go to the customer ID over here on the datab Bane right click on it and then we go to create and
over here we have sets as you can see the sets has the icon of joins but it is not joints it has just the same symbol
so let's click on that and now we have new window so let's see what do we have over here so we have first the name of
the set so let's call it set one and fixed and now we we have over here three tabs General condition and tops as you
can see those are the different methods of creating sets in Tableau the general tab is actually the manual selection the
condition as you know the dynamic set and the top as well is a dynamic set so now we're going to go with the first one
we're going to start with a general manual selection and now here in the middle we have a list of all customers
in our data sets and we have to go and start selecting manually which customers are in and which customers are out so in
our example we selected the customer to and the customer 5 to meet the members of the in group and anything that you
are not selecting going to be on the out group so that's it the customer 1 3 4 are out so let's go now and click okay
so now let's see what happened on the datab ban we have a new field it's going to be discrete Dimension and since it's
set it going to has the following icon as I said it's like the icon of joins so now let's see the values inside this
field let's drag and drop it over here and now as you can see we have only two values out and in it's like Buon data
type we have true and false and here as well in the sets we have only two values so we selected the customer two to be in
the set and as well the customer 5 to be in the set the rest going to be out so this is how you can create sets in
Tableau using manual selection and it's going to be fixed all right so now we're going to go
and create a dynamic set using condition our example was the customers with the score higher than 400 so let's go again
to the left side right click on the customer ID go to create and then to set so let's call it now set two and we're
going to call it condition so since we are making now a condition we're going to go to the tab condition over here so
now we're going to go and specify for Tableau the rule to decide which members are in and which members are out the
rule says score higher than 400 so let's define that first we have to select this by field so our field is a score which
is correct and then the operation over here is not equal it should be higher than 400 so we have to specify the value
over here and that's it if the score is higher than 400 the customer going to be in otherwise it's going to be out so now
let's go and click okay and as you can see we have another dimension on the data pane called set two so double click
so let's check the values the score over here 350 which is out 900 in 750 in 500 in and null it's out so as you can see
it's really easy to define the dynamic set we have just to provide the rule and TBL and do the rest and if to tomorrow
we have different data the set member going to change so now we're going to create another Dynamic set using the
rank so in our example we had the top two customers is going to be in and the rest going to be out so again we're
going to go to the data Bane right click on the customer ID create then set let's give it a name so it's going to be sit
three and rank so now we're going to go to the third tab over here to the top so let's go there so for this example we're
going to use the score to rank the customer so the highest two scores going to be in so in order to do that it's
it's really easy we're going to Define it here by field and here in ranking we have top or bottom as you can see so
we're going to stay with the top and next we have to Define what we are selecting top two customers top 10 top
five top 20 so here we have to go with a two and by score so we are using the score everything is correct and that's
it so this is how we Define the rule and tblo going to do the rest so it's really logic if you just read it top two by
score all right so that's all let's go and select okay again as you can see we have the set over here in the data ban
double click on it and now let's check the data as you can see Jan and George they have the highest scores that's why
they are in and the rest they are out so as you can see sets are really easy in Tableau all right so now we're going to
go and make it little bit complicated where we're going to create combined sets so we're going to go and combine
set one with set three so in order to do that we're going to go again to the data Bane but this time we're going to start
from the set so let's go to the set number one right click on it and then we have here an option called create
combined sets let's click on that so as you can see we have here a new window for the combined sets first let's give
it a name so it's going to be set four and combined so first we have to define the
two sets so we have here's the set one since we started from it and then on the right side if you click on it you will
get the list of all sets available in the data Bane so we have the set two and set three so we're going to go with the
set three all right so with that we have to find which sets going to be combined but now we have to Define for Tableau
how the data going to be combined so here we have four options the first one is going to be all members in both sets
the second one only the shared members on both sets and the next one is going to focus on the set one and the last one
going to focus in the set three so for this example we're going to go with the shared members in both sets so let's go
and select that and as you can see here between the sets the icon did change as well all right so now everything is
ready let's click okay so here again on the data pin we have a new field new dimension let's see the results I'm
going to go and double click on it so now let's see the results we are combining the set one over here with the
set so here if you go and search for the shared member it going to be only the customer 2 since it is in in the set one
and as well in in the set three so as you can see we have only one member in the combined set and that is the
customer John because it is the only shared customers between the two sets so it's really not that hard you just have
to pay little bit attention to which combining option you are using all right guys so so far we have
learned how to create the sets from the datab Bane using different methods next we're going to go and learn how to
create the sets directly from the views all right so now we're going to go and create a new view and it's going to be
something similar to the cluster group so we're going to have the two measures profit and sales so let's go and select
them so double click on the profit and double click on the sales we have now the two access what we are missing now
the customers so in order to add the data points we're going to go to the customer ID and double click on it so
now we have our view and we're going to go and create the set directly from the view so here it's very similar to the
groups we're going to go and select which customers going to be the member of our set so in this example we're
going to go and select the customers with the high performance so all what you have to do is to select like this
let's go for those customers and again here we have this new window last time we have created the group but this time
we're going to go and create a set from those customers so click on that and then we have to select this create set
so let's go and select it so now we have a new window and as you can see we cannot Define conditions or any Dynamic
sets it's going to show us a list of all customers that we have select ected in the view and the only thing that we can
do over here is to check did we select all the customers correctly and if we done any mistakes we can go and remove
the customer so now let's give it a name I'm going to call it set customers High performers so that's
all for now we're going to go and hit Okay so let's select that so now as you can see nothing changed yet in our view
we have now new field on the datab Bane called set so we just created new set directly from The View and now quickly I
want to show you something if you are selecting group like this and let's say the window here disappeared what you can
do you can go to any of those data points right click on it and then here the last option is create set so this is
another way how to create a set directly from the view all right so now we have the set
and you might ask me okay what you can do with it well we can do many things with the set now so first we can
highlight it in our view so in order to do that we're going to take the set from the datab ban and let's just put it on
the colors and now we can quickly see which members are in and which members are out watch so here as you can see
table always use the color gray for the members that are out of the SE and of course you can change that by going to
the marks so if you go over here then we go to the edit colors and you can Define over here the color of in and the color
of out but for me now the colors are okay so let's click okay so with that you are highlighting subset of your data
for the end users all right so the other use of the sets inside our view is that to focus on specific subset So currently
we are showing all the customers the in and the out so how to filter the data only for the customers that are member
of the set only for the end group in order to do that we're going to go to our set right click on it and here you
can find two options so as you can see by default we have show in out of set that means we are showing everything but
now we have another option called Show members in the set so that means we're going to filter the data and we're going
to show only the members inside our set the end group so let's go and select that and see what's going to happen so
as you can see now Tableau remove all the customers that are outside of the set and we can see on The View only the
members of the set so this is really quick way on how to filter your data and to make a focus in specific scenario but
now you might say you know what let's give this option to the users so let's have the audience the users decide in
which subset they going to focus on this going to make your view more interactive and dynamic so in order to do that we're
going to over the set as a filter so let's see how we can do that first we have to show all the data points in our
view so we're going to switch that pack let's go to our set right click on it and we're going to go and select show in
out of the set show everything so it's select that and next we're going to offer the set as a filter so go to our
set again right click on it and here we have the option of show filter let's select that and now as you can see on
the right side we have the two options in out and all so now we have different scenario if the users wants now to see
the whole big picture all customers they're going to leave the filter as it is but if we have different scenario
where they want to focus on the subset on the customers with the high performance all what they have to do is
to deselect out in the filter so let's go and do that and now as you can see we are focusing on the subset of the group
in only the members in the set and for some other reasons another users want to focus on the groups that are outside of
the set maybe to understand their behavior and so on so they're going to deselect the in and select the out so
now we are focusing on the group that are outside of the set and again if you want to see the whole big picture you're
going to select both of them so I really prefer to give this option to the users to decide in which subset they going to
select and they're going to focus on because with that you are covering many scenarios in only one view all right
guys so now with the sets in Tableau we can go step further where we're going to give the full Dynamic to the users and
they going to have the option of defining which customer is going to be in the set because so far what we have
done is that by creating the views we defined everything so we defined which customer is going to be in and which
customer is going to be out but now instead of redefining it we're going to give the options the full Dynamic of
defining the whole set so let's see how we can do that so in order to make the set Dynamic and interactive we're going
to add an action to our worksheet I will dedicate later a full tutorials on the actions and the interactivity in Tableau
but now let's just learn how to add add action for sets all right so in order to do that we're going to go to the main
menu in Tableau to the work sheet so I select that and then here we have actions in Tableau let's go there now I
will not go in details explaining all the option that we have in the actions because here we have way more than sets
we have a lot of things so now just follow me we're going to go to the add action over here and then we have the
option here change sets values so that means the actions of the users going to change the values inside our set so
let's go and select that now we have to give an action name so we're going to call it action change set and now we can
select in which worksheets this action can be applied so now if you go over here you can see the list of all sheets
that we have in our whole workbook so now I want to apply this action only on this worksheet so everything is fine and
now here we are defining the behavior of the user so now the question is when the action going to be triggered either by
hovering in the mouse or by selecting the data points or by drop down a menu so I will stay with the default let's
have the user clicking on those data points all all right so now we're going to define the target sets which sets
going to change once we do the action so let's see what do we have here so as you can see we have two data sources in the
tutorial we created in the small data source three sets and in the big data source we have created only one set once
the action is triggered the values of these sets should be changed so let's select that and now we are coming to the
interesting part but first some coffe okay so here we have two types of actions with the mouse so first let's
check the left side what going to happen when we select a data point the first option going to to say assign values to
set so that means it's going to create completely new set from what you selected the second option is ADD values
to set so tblo going to hold the old values and everything that you are selecting going to be added to the set
and the last option is anything that you are selecting going to be deleted from the set so here it really depends on how
do you want the users to interact with the view so either you want them to create completely new set so you're
going to go with the option one or you want to redefine a sets and you want them to extend it by adding new members
to the set so you're going to go with the option two or you want the users to start removing members from the
pre-existing sets I would say let's go with the option two where the users going to add members to breed def find
set all right so that is for the left side what going to happen once the user start selecting and on the right side
what going to happen once the user starts moving away from the selection so here the first option is to keep the set
values second is to add all values to the set so that means once the users start moving away from the selection all
the members all the customers going to be in the in group it's going to be inside the set and the third one is
exactly the opposite what's going to happen all the data points going to be outside of the set so I think both of
them are extreme we're going to leave it as it is keep set values so now let's skip those options and let's see what
can happen in the view once we start selecting so let's go with okay so as you can see here we have our new action
let's click okay and now let's go inside the view and start selecting stuff but before that I want to change the shape
of those data points to be more clear so let's go to shapes and use the field Circle all right so now I'm not
selecting anything like if I move my mouse over here you will see nothing going to change but the action here is
to select so to click on the data point so let's click on that let's move away so now you can see this member is blue
that means it is in the set and anything I'm clicking on those data points going to be inside our set or we can go over
here for example and select all those stuff in one time so now anything that I'm selecting The View as you see it's
going to be included in our set so with that we are going full Dynamic and we give the option for the user to Define
which customer is in and which customer is out all right guys so with that we have covered everything about the sets
how to create it as a fixed Dynamic from the datab Bane from The View how to add actions to it how to add it to filters
this feature in Tableau is really great all right guys so now let's summarize the sets in Tableau going to
divide your data based on specific criteria or selection into two groups so we have the in subsets it's going to
contain all the members inside the sets and the out subsets it's going to contain all members that are not
included in the set the sets is very important feature in Tableau since it's going to allow your users to focus on
subsets of your data and to compare it with the remaining data and sets are great way to add Dynamic and
interactivity to your views by giving the options for the users to Define in which subset they going to focus
on all right guys so so far we have learned different methods on how to group up the values of Dimensions into
groups but now we will learn how to to group up the values of measures into groups and for that we're going to learn
the pins in Tableau and as usual let's first understand the concept behind the pins and then we're going to learn how
to build it in Tableau so let's go all right guys so before as we learned dimensions and measures we
learned the secret formula of building new views and that is measure by Dimension like sales by category but
sometimes we have to build view from two measures so it's going to be measure by measure like profit by sale quantity by
profit and so on one way to do that is by converting one of those measures to bins so we will have profit by sales
bins and quantity by profit pens so what is pens pens divide the data into groups of equally sized containers resulting in
systematic distribution of the data and we can use those pens to create charts called histograms so histogram going to
classify your data into different pins and then counts how many data points do we have inside each of these pins and in
histograms we usually use the par chart to visual the data all right so now let's have an easy example in order to
understand the pins and histograms all right so now let's have the following data we have 10 customers and with their
scores the scores are like points that the customers collect and now we want to count how many customers fall within a
range of scores for example how many customers do we have in the range between 0o and 30 30 and 60 and so on so
first we have to create pens in order to create pens we need few informations like what is the highest value in the
scores so it's going to be the first customer the 63 and what is the lowest value in the scores it's going to be the
zero the next value that we have to Define is the size of the bin so for example here we're going to take the
size of 30 and now we have all the information that we need in order to create the pins don't forget they are
equally sized so what that means so the first pins that we have is between zero and 30 it starts with the lowest value
the zero and the size should be 30 that's why we have the range between 0 and 30 so this is our first pin the next
one going to be between the 30 and the 60 again as you can see the size is 30 and now the last pin going to between 60
and 90 and with that we're going to stop because with the last pin we can cover the highest value so with that we have
created from the measure score and equally sized pins and now after we created our pens we going to go and
count how many customers how many data points do we have inside each pin all right so now let's start counting the
customers for each pin our first pin starts from 0 to 30 so let's see how many customers do we have inside this
range so the first customer is out we will not count it the second one is inside the range so we have one customer
two customers three customers this customer is out of the range the same over here so here we have the first
customer this customer is out we have the customer number five and that's it so we have five customers between the
zero and 30 all right so now let's move to the next pin how many customers do we have that their score is between 30 and
60 all right so now let's start counting and scan our table I think all those values are out we have this customer
that is inside this range then we have the 45 and as well 55 so we have four customers they score between 30 and 60
so this is our second pin let's move now to the last pin so we have the range between 60 and 90 and now let's count
how many customers do we have inside this range so we have 10 customers we have already nine so I think we have
only one and that is the customer number one and all other values are not in this range so we have one customer and that's
it with the we have created a histogram for the scores we just have to create the pins and count how many data points
are inside each of those pins and we call those blue bars as pens and each pin has a size and now let's say that we
want to Define another value for the size of the bin and we take the value 10 so what going to happen we going to have
more pin so the first one going to be between 0o and 10 the next is 10 to 20 20 to 30 and so on so it makes sense if
you define smaller size for the pens you will get more chunks from the data so instead of having three pens now we have
seven pens and as you know after creating the pens we're going to count how many customers do we have inside
each of those pens so if you go and start counting you're going to have the following histogram so as you can see
what is defining the score is the lowest and the highest values inside our data and as well the size of the pens so as
you can see using the pens we created different groups from a measure and now you might ask me why do we need
histograms why they are important well if you compare the table on the left side with the visual on the right side
and the histogram you can quickly identify Trends and patterns in the distribution of the customers like you
can see quickly that most of our customers have the score between zero and 30 so this type of chart going to
help you quickly understand whether everything is okay or you have to improve in certain areas so you can
Define new strategies and make better decisions using the data all right so now let's see how we
can create pens and histogram in Tableau and we can do that only on the worksheet page we cannot do it at the data source
page and there is two ways in order to do that either we create pens in the data pane or we can create pens in the
visualization so let's start with the first one so now we're going to create a histogram for the customer scores and
we're going to stay with a big data source on the left side we're going to go to the data Pane and we need the
score so right click on it and then we go to create and here we have the option of pins so let's go and click that so
now we have here a new window to create the pins the first one we have the field name we're going to leave it as it is
the second option here we have the site of pens and here as a default tblo going to follow specific mathematical equation
in order to find the suitable size of pens but if you don't want this value you can go and change it so for example
let's go with the value of 20 and after that we found informations about the range of values so what is the minimum
value and the maximum value that we found inside the field score and the differences between them so for now
that's all we're going to have the size of B of 20 and let's hit okay and now if you check the data Bane on the left side
you can find a new field called SC score bin it is a dimension because it has aite number of values and the score
going to stay of course as a measure so let's check the values inside our new field so let's drop it here on the rows
and now as you can see we have the pens and the size of each pen is 20 okay so now so far we have the pens from the
score the next step in order to make a histogram is to get the count of the customers so now let's use this measure
the customer count drag and drop it here on The View and then I have to switch between them so it looks like a
histogram so with that we have our histogram but we are not there yet to make it look like a real histogram we
have to have the bins as continuous so if you check the score bin on the left side you can see it is a discrete it is
a blue color and now we're going to go and convert it to continuous so right click on it and convert to continuous
let's click on that and it's still in the view as a discret so we have to converted as well here in the view as a
continuous so with that we have created a histogram in Tableau I'm going to add the Final Touch where I'm going to add
the values for each pen so we go to the labels show Mark label and now I'm going to change as well the coloring in our
histogram so I'm going to take the score pin and put it in the colors let's do that we are still not there I would like
to have the pin with the highest number of customers to be darker so in order to do that we're going to go to the
customers edit color and then we're going to go over here and reverse it click okay now I'm happy this is how I
usually present the histograms in the projects and now once we have the histogram we have to discuss it in order
to understand the data so usually we search for Peaks for valleys or any outliers that stands out and for
histograms there are different shapes with different interpretations and the shape of our histogram that we have
called skewed to the right skewed to the right means that the histogram on the left side has the highest peak and then
the frequency of the data going to be descending as you go to the right and on the right side you're going to have the
lowest frequency of the data points which is not really good in this example that means we have a lot of new
customers that didn't collect yet any points so the histograms are really powerful to see the distribution of your
customers in one pck and to quickly understand whether there are issues in your business or if you find any new
trends so now for this example we have decided that the size of the bin is 20 let's say that you want to change the
distribution and you want to change the size as well so in order to do that let's go to our field right click on it
and then we go to the edit so let's select that and here we can go over here and change it to 10 let's click okay and
now as you can see we have more pens and more details about our data so now you might ask me I want it to be more
Dynamic and I want to give the users the option of defining how many bins do we have and for this we're going to use
another feature called parameters which is going to be in the next tutorial all right so now so far we have learned how
to create pens from the data pane there is another way to create pens and histogram in Tableau which is way easier
than what I showed you we can do that directly from the visualization let me show you what I mean so let's create a
new worksheet and let's say that I want to create a histogram from the sales so in order to do that we're going to go
and take the sales and put it on the RADS and then we're going to go over here on the show me and we have
predefined visualization from Tableau called histogram so the requirement for this visualization is only one measure
so once we click on that you will see that TBL did everything if you check the data pan on the left side we have
already a bin or Dimension called sales pin with the role of continuous and of course table going to suggest the size
of the bin you can go and change that of course but as you can see it's really easy we just took one measure in the
view and click in the histogram the rest going to be done from Tableau and this is exactly the power of Tableau in the
visualization all right guys so now let's have a summary P's going to divide your data
into equally sized containers which going to result in systematic distribution of the data and pens are
the method of creating groups from measures so that means we can create pens only from the measures we cannot
created it from Dimensions because dimensions are already bins and Bens themselves are dimensions and it's
better to convert it to continuous Dimension to be used in histograms and one limitation in Tableau that you
cannot create pens from calculated fields and the main purpose of having pins and histogram is to quickly
identify patterns and Trends in the distribution of your data all right guys so that's all for the pins and
histograms and with that we have learned everything about how to organize and customize our data in Tavo and we are
done with this chapter next we will learn in Tableau how to filter your data using different techniques at different
layers Tableau filters in Tableau we have many different types of filters for different purposes like optim izing the
performance or as well for your users to explore your data that's why it's very important to understand them and the
differences between them so that's why first we're going to start by understanding the concept behind the
different types of filters in Tableau and then we can learn the different methods on how to create all those
filters in Tableau moving on we're going to learn the many different options on how to customize the filters in Tableau
and at the end I'm going to share with you many tips and tricks B practices of using filters in Tableau that I usually
follow in my projects so let's start with the first topic where we going to understand understand the concept behind
the different types of filters in Tableau so now let's go all right guys so now we're going to
talk about the filters in Tableau but first as usual we have to understand the concept behind them and then we're going
to learn how to build filters in Tableau so let's go all right so now we're going to start
with the question what are filters filters means to remove or select a subset of the data for different
purposes and use cases and in Tableau we have the following reasons or use cases for filters the first use case for the
filters is to reduce the size of your data reducing the size of your data inside Tableau going to improve and
optimize the performance of your dashboards especially if you are dealing in the project with a huge data source
reducing the size of such a data source going to mean reducing the processing time inside Tableau which going to lead
to optimize response time in your visualizations so this is one of the reasons why we use filters in tableau to
optimize the performance of our dashboards the Second Use case of filters is interactivity and analyzes we
usually offer a set of different filters for the users because different users may have different goals or may be
interested in specific aspect of the data so that means allowing the users to filter and to focus on subsets of the
data going to help in better analyzing and understanding of the data and the third use case for the filters is hiding
sensitive informations data securing is becoming very important topic in each project as now many people are working
with the data the data security is becoming a very important topic and in Tableau we can use filters to restrict
the sensitive data or to hide it from the viewers to make sure that we are protecting such a sensitive or
confidential data from being exposed to the others and the fourth use case for the filters is data Access Control Ro
level security RLS so this means that we can use the filters in tblo to limit the access to data of the users based on the
role and the permissions because in real project you cannot just go and build visualizations and share it with
everyone instead you have to protect your data and to have some data rest structions like for example you're going
to have users like sales employee they should not see the data like managers so in order to protect your data and
implement the RO level security in Tableau you can use filters so as you can see filters are really useful in
data visualizations and in Tableau we have six different filters for different purposes and use cases and I group them
under two categories the first group of filters they going to optimize the performance so we have under this
category the extract filter data source filter and the context filter and we have another group for the interactivity
and for analyzes and underneath this group we have the following filters we have Dimension filter measure filter and
table calculation filters and now I'm going to go and explain them one by one all right so now in order to
understand how the different Tableau filters work let's have a quick recap on how Tableau process the dat data through
different layers let's go first you connect your original data into Tableau Data sources by either having an extract
connection where you going to load an extra copy of the data inside Tableau or you can use a live connection between
your data and Tableau Data source to get data on demand then you might have different worksheets connected to the
data source and for the visualizations they going to send a query to the data source and then the data source going to
respond by sending the result data back to the visualizations and to the worksheet so as you can see your data is
moving through different layers different stations and if you are not using any type of Tableau filters the
whole amount of data going to be moved and processed from one layer to another layer so for example and those are just
numbers to explain the concepts we have in the original source of our data 30,000 records that means the whole
amount of data going to be exist as well at the data source level so there we're going to have as well the same number of
recards 30k and then the same amount might be as well the results of your queries so we're going to have as well
30k records in the visualizations so we might be in situation where the source of our data might has a lot of
unnecessary data so it's going to be really wasting resources and performance in Tableau if we are going to process
the whole amount of data in each layer so what we're going to do we're going to go and apply different types of filters
as your data is moving from left to right from the sources to the visualizations the first type of filters
that we can use code called the extract filter you can apply the extract filter between the source of your data and the
Tableau Data Source you can use this type of filter if you are using the extract connection so that means you
cannot use the extract filter for the data sources using the live connection so the extract filter will be used to
filter the data before it even enter the Tableau Data source so for example if we are using the extract filter instead of
having the whole amount of data in the data source we might have only 20K of recards so the main purpose of the
extract filter is to optimize the performance of loading data into Tableau sometimes you might be in situation
where loading the extract or refreshing the extract in the Tableau Data Source taking very long time here usually we go
and create the extract filter in order to get R of all unnecessary data and remove it before it even enter Tableau
and another benefit is optimizing the performance of your visualizations because we're going to have less data
less processing time in Tableau and that's going to result in better response time time in your
visualizations so the main purpose of extract filter is to optimize both the loading time and as well the response
time and now let's move one step to the right side we have another filter we call it the data source filter so you
can apply this filter between the Tableau Data source and the worksheets so here again the worksheets are sending
queries to the data source but this time the data source will not respond by sending everything the whole data but
instead here the data Source can to filter the data first and then send the results so here instead of sending 20K
of Records here Tableau might send like around 10k of Records so here again the main purpose of the data source filter
is to reduce the size of data so that means and you know that already having list data means less processing time in
Tableau and better response time in the worksheet in visualizations and here we have another use case for the data
source filter is to hide sensitive informations from the worksheets from the viewers
all right so now the question is what are the main differences between the extract filter and the data source
filter those two filters are really similars but still we have some differences the extract filter as the
name says it could be applied only on the extract connections while the data source filters could be applied in both
extract and live connections extract filters could be found only on the Tableau desktop version but the data
source filter we can find it in both Tableau desktop and Tableau public and the main purpose of the ex ract filter
is to optimize both of the performance of loading the data and as well the response time in the visualizations
while the main purpose of the data source is to optimize the response time in the visualizations and as well to
hide sensitive informations from the viewers from the worksheets all right so now we're going
to move one more step to the right side to the next station where the data is now inside our worksheets and here we
can use a very unique Tableau filter called the context filter in Tableau if you create a context filter what you are
doing is creating an additional layer inside the worksheets where tblo going to take the result data from the data
source and create a new optimized timal table based on the filter inside the worksheet and then the visualization is
going to get the data from this timberl new table or subset and here the downside of the context filter is we are
losing performance because tblo can spend resources and time in order to build this temporal table so now you
might ask me why do we need context filter if we have data source filter we can easily use the data source filter in
order to reduce the size and with that Tableau don't waste any resources or time in order to build this layer this
extra table well the answer for that is flexibility because once you apply a data source filter you are filtering all
the worksheets that are connected to this data source and in some scenarios you cannot use the data source filters
because you have different requirements and different focus in each worksheet so you cannot set up one filter that is
suitable for all worksheets and here comes comes the power of the context filter where you can fulfill all the
different requirements by defining different filters for different worksheets so you are flexible with the
requirements and at the same time you are reducing the size of the data to optimize the performance of the
visualizations and here you can go and decide for each worksheet whether you want to reduce the data using context
filter or you want to have the whole data so having this option going to give you a lot of flexibility so for example
in the worksheet number one we could use a context filter where we can reduce the number of Rec cards to 7K and in the
second worksheet we could use a different context filter with different criteria where we can reduce the number
of recards to 5K so the context filter is really unique feature in Tableau but don't forget we have here a trade-off
between the flexibility and as well losing some performance because tblo have to create those temporal
tables so now by checking the big picture that's how the first category of the filters Works in Tableau we have the
extract filter that data source filter and the context filter and they share the same goal to reduce the size of the
data in order to optimize the performance of the visualizations these filters are usually created from the
Tableau developers and will not be offered for the users in visualizations and that brings us to the second
category of the filters we have the dimension filter measure filter and the table calculation filter we usually
offer these filters to the users to give them the power of slicing and dicing the data to focus on specific subset of of
the data so these filters usually exist in the visualizations and they share the same purpose to enable users to do
analyzes and to have better understanding of the data and it's better to explain those three filters
directly in Tableau and now by looking through the big picture you can understand that as
we are moving from left to right the importance and the priority of the filters are changing for example the
most important filter is the extract filter and as well as the highest spr in Tableau which means Tableau going to
process it first and the Tableau calculation filter is the least important and has the lowest prio so
that's means Tableau can to process it as a last one so the order of the filters in Tableau are very important to
understand in order to know where to apply which filter so the order of filters in Tableau are defined like the
following the first filter to be processed is the extract filter the next going to be the data source filter after
that we have the context filter then we have the dimension filter next we have the measure filter and the last in our
list is the table calculation filter so the top filter going to be processed first and as you are moving down the
list the filter going to be low prio and will be processed as a last so here again about the usage the extract filter
data source filter and the context filter is used to reduce the size of data and the other three filters going
to be used by the end users for analyzes and better understanding the data and now the question is where we can create
those filters the extract filter and the data source filter we can create them in the data source page and the other
filters we can create them in the worksheet page all right guys so now we have the
following task where we have to hide sensitive informations for example let's say that the USA Data in our data set is
sensitive informations and we have to hide all the customers that comes from USA and now we're going to go and build
a view from the customers we're going to take the location the country and then let's say we're going to take the profit
from the orders or all right so now as you can see in the worksheet we can see all the countries including USA so now
we're going to go and hide this sensitive information in order to do that we're going to go to the data
source page and then here on the corner on the top right we can see filters and we can add a new filter so let's go and
click on it then we will get a new window called edit data source filters it's really easy here we're going to go
to the ads click on it and then we're going to get a list of all the fields that are available in our data source so
since we have to hide the customers from USA we need the field country so let's go and check that over here then click
next and here we got another window to set up the filter for the country so as you can see we have all the countries
here listed and now we can go and select the countries that should be included in our data set or we can go over here and
click exclude and we're going to exclude the USA so that means we are filtering out all the customers with the country
equals to USA so let's go and click okay now we can see over here a quick information so the filter is based on
the country and the details is saying we are keeping the values France Germany and Italy so that's it let's click okay
let's go now and check the data in our worksheets so we're going to switch back to our view and as you can see we cannot
find any informations about USA and this can affect as well all the worksheets that are connected to this data source
so for example if we go over here and create a new worksheet and we take the countries drag and drop it over here you
can see again here as well we don't have the USA we have the values France Germany and Italy and with that we have
protected this sensitive information all right guys we on to another use case of the data source is to reduce the size of
data inside Tableau this is very critical if you have a bad performance in Tableau then you have to start
thinking about how to reduce the size of data inside our visualizations and the first step to reduce the size of our
data we have to decide which Fields we're going to use in order to filter our data a very common and usual field
is that we can reduce the number of years inside our data source let's go and build a view so I'm just going to go
and create a new worksheet let's take the order dates to the rows and let's take the profits to the columns and then
let's make it as a bar diagram and show the results so as you can see we have inside our data five years of data so
here this field is really good candidate in order to ruce the data and you have to go and discuss it with your users so
you have to ask do we really need five years of data inside the visualizations is it enough to have only like the last
two years or 3 years so let's say that after the discussions with the users you said the relevant data for the
visualizations is starting from 2020 so anything before is not relevant anymore for the visualizations we would like to
have everything starting from 2020 so in order to do that we're going to go and build a data source filter so let's go
back to our data source page we're going to go again over here so let's go to the edit and then we're going to go and
choose the field that we're going to build the data source filter on top of it so go to ad and then we need the
order date so we have it over here let's go and select it okay and here since it is a date T going to ask us first in
which format you want to build your filter since we are discussing about the years so we are interested in the years
I'm just going to go with the format years and go next so now with that we got a list of all years inside our data
source so either you're going to go and say okay I would like to include everything starting from 2020 and not
select the old years or you're going to say you know what I'm just going to exclude the last years anything before
2020 so you're going to go with the excludes and with that you are removing the old years I prefer this one over
here since let's say that we get 2023 data inside our data source you don't have to each time to go and click on it
so with that we are saying all the data are relevant starting from 2020 let's go and hit okay and with that you can see
inside our data source filters we got a new filter based on the years of order dates and here you can see some details
it says it keeps 2020 2021 and 2022 so with that we are filtering now the data source paste of the order dates and the
country let's go and hit okay and as you can see here we have now two filters in the data source let's go back to our
view sheet seven and we can see that we have only the data starting from 2020 all old data are not presented anymore
inside our visualizations which is really great way in order to reduce the stress and the size of data that Tableau
has to handle so with that we are reducing the scope of data and as well we are going to get great performance in
Tableau so this is how we use the data source filters in order to reduce the size of our data and as well to hide the
sensitive informations but here don't forget that all the worksheets that are connected to this data source can to be
affected with these filters all right so now we're going to learn how to build a context filter in
Tableau let's say that we have the following view we're going to have the category from the products and as well
the subcat and let's take for the measure the profits so let's take it over here and
as well let's change the colors so we're going to put it over here as well so now in this view we have all the categories
Furniture office supplies and Technology but the users want in this view to focus only on the office supplies and for this
specific view all the other categories are unrelevant informations so they want only to focus on the office supplies by
profits so that means we want to filter the data by category in order to do that we're going to go to the category over
here hold control and put it on the filters and then we're going to get again the same window for filtering and
here you can see the three values Furniture office supplies and technology for this view we want only the office
supplies so what we're going to do we're going to remove the others and leave the office supply then hit okay so as you
can see now we removed everything and we have only the one category the office supplies the job is done right so we
have the office supplies by profits and we filter the data the answer is yes the task is done but we are not using the
full power of Tableau since here the focus is only about the office supplies and we are focusing on this subset of
data we could go and reduce the whole data sets to only this category and with that you're going to win a lot of
performance in Tableau because you are focusing only on subsets and all other data is removed from this visualization
so in such a scenario we can go and use the power of context filters so now the question is how to make our filter as a
context filter so as you can see now in the filters we have our category it is pill and it is as well a dimension so
this filter type called Dimension filter in order now to promote it to the context filter as we learned before that
we have specific order of the filters we have context then Dimension all what we have to do is to right click on it and
here we have the option of adding to context once you do it you will see that our filter now has the gray Bill the
gray bills indicates that this filter is a context filter so now you might notice nothing changed over here we have
exactly the same view but we optimized the background in Tableau where we created a temporal data set and it has
only the category ofice Supply so it's really small table compared to the whole data source all right so now I want to
show you how Tableau process the different types of filters as we learned the order of the filters are really
important so that means the context filter going to be processed first then the dimension filter so the context
filter is dominating the behavior of the dimension filter all right so now we're going to go and add Dimension filter in
our visualization we're going to use the subcategory in order to do that so right click on it and click over here show
filter so as you can see on the right side we we have all those values that are included in the office supplies but
in our original data source we have way more subcategories as we are seeing now from this View and this is exactly the
effect of the context filter on this Dimension filter so we are seeing only the values inside this context all right
so now we're going to go and change the definition of the context filter and see the effect on the dimension filter so
let's go again to our context filter right click on it and edit filter let's bring it here side by side to our
Dimension filter so we have only those values and we have over here on the context filter only the office supplies
if we go now and include as well the technology let's apply and see that on the right side the value is going to
change so let's go there and now as you can see in the dimension filter subcategories on the right side we have
more values than before because we included in our context in our temporal table the technology data so we can go
and change the values around so let's have only the furniture check the right side apply and you can see we have only
four subcategories so with this you can see that the context filter is really dominating all other filters below it so
understanding the order of the filters you can understand how Tableau works with those different types of filters so
now I'm going to bring the context filter again to the office supplies and hit okay and one more thing about the
context filter as we learned before it is flexible that means we can reduce the size of data only for one worksheet so
that means if you go to any other worksheets you will not find here any context filter so you can go and decide
for each worksheet whether you want to reduce the size of data or not unlike the data source filter where it can
affect the whole work book any worksheet that is connected to this data source so with the context filter we have way more
flexibility and now you might ask can we use the context filter to hide sensitive informations well the answer is no let
me show you why let's have a quick example let's take the customers again and we have the country City and let's
take as well the profits so as you can see over here we don't have the USA Data because we have the filter data source
and now let's say that the data of Germany is now sensitive and we want to protect it using the context filter so
let's go and do that we're going to take the countries hold control and put it on the filters and we're going to say we
want to exclude Germany so I'm going to click over here on the exclude and then hit okay as you can see now in the view
we don't have any informations about Germany and we go and promote the country to context filter so right click
on it and add to context and now you might say okay everything is fine we don't have any informations about
Germany so we are secure well not really there is still a way in order to see the German data in the view let me show you
how if you go to the city over here and let's show it as a filter on the right side you will find all the cities from
France and Italy so there is no cities from Germany or USA But Here we have an option on the filters so if you go to
this small Arrow over here then we can go over here and say all the values from the database I'm going to explain all
those options later don't worry about it but let's go and click over here so now as you can see the filter is showing
data about Germany we have Berlin we have Stuart so that means the data are not really protected so that means we
are hiding the sensitive data from The View but still we can see all the values from the filter that's why never use
cont x filter to protect your sensitive data or confidential data because even if we are seeing the data only in the
filters it's still exposing the data and the data is not protected so that means if you want to protect your data and
hide the sensitive informations use only data source filters all right so now we're going to
move to the next filter in our chain we have the dimension filter we have already created some Dimension filter in
our view but now let's go in details and see all the options that we have all right so now let's go to the filters on
these shelves and you can see that we have the subcategory it is a discrete Dimension that's why we have the color
of blue and now in order to see all the options right click on it and edit filter and now you already know this
window let's just bring it over here to see the effect directly in the view so first we have here different tabs the
first one is going to be about the manual selection and the rest is going to be a dynamic filter so here we have
four TPS General wild cards condition and top so the first one is going to be the manual selection of the values and
the rest is going to be like you are defining a rule and the filter going to be dynamic so here as usual since it's
discrete we're going to see the list of all possible values that we can see and then you can go and manually select or
deselect values from this list and as you can see on the right side we have exclude the default in Tableau is
include so that means anything that I'm selecting from this list is going to be included in the view and anything that
I'm not selecting it's going to be excluded from the view in order to have the opposite effects what we can do we
can click on exclude and now we're going to have all the values that are selected are crossed out so that means they are
excluded from The View and everything that is not selected going to be included in the view so here it really
depends if you want to exclude only two values from a long list then it makes sense to go and use exclude so now if
you go and select apply you can see in the view the remaining values are application art and Benders so Tableau
did exclude all those values and you're going to have the same effect if you deselect the excludes and select only
the application art and Benders and in order to remove our selections we can remove everything from here so select
none and we can reapply our selection on the application art and Benders and as you can can see we're going to have the
same effect so this is how you work with the manual selection at the first tab General but now let's move to the next
one and before that I want to include everything over here so we don't affect the next one so let's apply and then we
go to the wild card so here we're going to work with the wild card if you have a dimension with high cardinality that
means you have a long list of all possible values in the dimension and if you go and select manually everything
it's going to be really painful so instead of that we can go and Define the rule if there is a rule to Define so
here we have like an input field we can write something like for example a so here we have four options the first one
is contains it going to means that somewhere in the world there is a character a and then the second option
we have start with it's going to means that the word going to start with the character a the next one is exactly the
opposite it's going to end with a then the next one we have exactly matches that means the word should contain only
the value a so let's start with the first one if the word contains a somewhere then it's going to stay in the
visualization now as you can see all those words contains a somewhere so the application we have it here at the start
and at the middle art as well at the start and here we have it in the middle and so on let's try out the second one
it's going to say if the word starts with a it going to stay in the view so let's hit apply so as you can see we
have only two words that starts with a all right so now let's go to the next option we're going to have ends with but
instead of a we're going to have s so any words ends with s going to stay in the view so let's apply that and as you
can see all those words ends with the character s well now you might ask is it a case sensitive well it's not so if you
have a big S as you can see it's still table going to select those values and now let's go to
the last one it's going to be exact match so if you go over here and select okay you will not see any data but if
you have exactly labels and hit apply you will get only one subcategory it is the labels but we don't use it usually
we use contains or start with ends with so this is how the white card Works let's clear everything in order to have
the data so we have it contains and hit apply now let's move to the next tab we have a condition in the previous
tutorials with the parameters we have already worked with a condition conditions and top so here what we're
going to do we're going to define the rule and TBL going to go and check all the values and filter out all the values
that are not meeting this condition so for example if you are checking our view we have some minus values in the profit
and we don't want to see it so we will go and Define a rule that we want to see all the profits that are higher than
zero so only the positive profits in order to do that we're going to select over here by field table going to show
you immediately the measure that is using in the view so we are using the profit sum is correct so we're going to
go over here and say the sum of the profit should be higher than zero so with this we have defined the rule and
let's hit apply so as you can see we have just removed the subcategory that does not fulfill this condition so
that's it this is really easy we're going to move to the next one but first let's reset everything so we're going to
select none and then we're going to hit apply in this tab we can Define if we want to see the top 10 products or five
products or the lowest or the bottom five products so here again we have to define the rule for Tableau and Tableau
going to filter the data base on our rule so here we have two options either we have the top subcategories or the
bottom subcategories so let's go by field over here and then here we have two options as I said top and bottom and
then we're going to Define is it top 10 is it top five or top parameters as we learned before and here we're going to
stay with the same since we are using the profit and that's it let's hit apply and now we can see on The View that
Tableau did filter our view based on our rues so now we have the top five subcategories all right so that's it
this is the different options on how to filter the dimensions I'm going to deselect everything over here and then
we're going to go to the manual selection and then hit okay so instead of predefining the rul for the users
we're going to offer the whole dimension as a quick filter for the end user and as you know in order to do that we're
going to go to the dimension right click on it and show filter so the user is going to go to the quick filter on the
right side and start selecting the values that suits their needs all right guys so now let's move
to the next one we have the measure filter as we learned in the order chain it is below the dimension filter so
let's see how we can create a measure filter all right so in order to create a measure filter we're going to go to the
sum of profits let's called control drag and drop it to the filters then we're going to get a new window in order to
configure our filter and since it is continuous measure TBL going to ask us do you want to filter the original data
all values or do you want to do the aggregations and then do the filters so since it's measure we have the following
aggregations like sum average median and so on or if you want to do only the filter on the original data then you're
going to go and select all values but since we have some of profit I would like to go with this some aggregation so
let's select that and then go with next and now we're going to get a new window in order to configure our measure and
here we have four options range of values at least at most and special since our measure is continuous tblo
going to present it as a range it has a start and end so it's not like the dimensions where we're going to get a
list of all values from the data source we will get only aggregated data and we can configure only start and end so in
the first option we can configure the starting point of the range and as well the end point of the range so you can
control both of them in the next one we can control only one of them only the starting point so at least here we can
specify what is the minimum value that is allowed in the visualizations and the next one is going to be exactly the
opposite at most we can Define the end point of the range what is the highest value that is allowed in the
visualizations so again the range of values we can specify the start and the end at least we can specify only the
starting point and at most we can specify only the end point of our range then the last one the special is about
the null values so here we have three options null values if only you want to see the null values from this filter
none null values that means you don't want to see any nulls inside our data or all values you are allowing both of them
so as a default we stay all values I'm going to stick with that and I would like to like configure both of the end
and the start of our continuous measure so that's it as you can see it's really easy let's go
and hit okay and with that you can see we got a new filters inside our filters and it has of course the green color all
right so first we're going to go to our measure filter and show it as a quick filter so right click on it and show
filter and now we can see the range on the right side let just make it a little bit bigger to see the range so now as
you can see we have like start and end but it is not completely for the whole bar here table want to show you that we
are not showing all the Val values we are showing only the range of the subset so now what can to happen if we take the
end to the right and the end to the left nothing going to happen on The View we're going to have exactly the same
data but here we can see in our range there is different colors the light part can to indicate that if you change the
values here nothing going to happen in the view so as you can see if I just move it over here the view will not be
filtered and now if I start moving the start inside the dark Parts you can see that now we have now an effect on The
View so the dark color in the slider is the relevant values and the light part is the unrelevant
values all right guys so now we're going to talk about the last type of filters in Tableau the table calculation filter
it is the bottom of the chain and you can see each type of filters going to have an effect on this type all right so
let's learn how to build table calculation filter and as the name suggest it is a calculation and we're
going to have a whole section on how to create calculations in Tableau so now don't worry about the details how to
create calculations in Tableau just follow me with the steps now all right so now we're going to go to our measure
the marks right click on it and then here we have the option of quick table calculations and then we're going to
have a list of all different calculations that we can do it on the table and now we will go with the
percent of total so let's select that and now we can see a small icon to the measure it indicates that this is a
table calculation so hold control drag and drop it on the filters and release so here since it's a continuous field we
have to Define it as a range so let's click okay and now we can see in the filters two measures for the same field
the first one without triangle icon it means it is a measure filter and the second one with a triangle icon it means
it is table calculation filter so what we can do with that we can offer it to the users so we're going to right click
on it and show filter we can see it now as a quick filter on the right side and the user can go and use the filter so
that's all about the table calculations filter all right so with us we have learned the different types of filters
in Tableau and how the order of the filter in the chain going to affect each others all right so now let's have a
quick summary we're going to start with the extract filter at the top we can use it only on the extract connections and
we cannot find it in the tblo public version don't worry about it it is very similar to the data source filter and
then next we're going to have the data source filter in order to create it we go to the data source page and here in
our example we created two data source filters the first one is to hide the sensitive informations of the country
USA and the second one to reduce the overall size of our data sets and don't forget that the data source filter going
to affect the whole workbook all worksheet that are connected to this data source then the next filters we can
create them all in the worksheet page so let's go over there so here you can see very nicely how the different types of
filters are sorted in the filter shelves the first one we have the context filter the gray pill context filter going to
create a subset of data or a temporal table only for this view so it is something locally only for this view but
don't forget do not use context filter in order to hide or protect sensitive informations since there is possibility
to show the values in the filters the next three filters we usually offer it to the end users in order to slice and
dice the visualizations so the users could use it to specify a subset of data to make Focus analyzes so next we we
have the dimension filter like the subcategory after that we have the measure filter and the last one in the
chain we have the table calculation filter and since those different types of filters has a logical order it would
be nice as well to have this order on the quick filters on the right side so so it makes sense to have the dimension
filter at the top then we're going to take the measure filter as the next and the last one going to be the table
calculation filter all right so that's all it could be confusing at the starts but now after you understand how Tableau
works and The Logical order of the filters everything then going to make sense in the
visualization all right so now we're going to talk about how to apply the same filters in different worksheets
because if you are building like different views you end up having exactly the same filters in each View
and it's going to be timec consuming if you are going in each worksheet and adding exactly the same filters so
instead of that we can share the same filters to be applied in different worksheets and in Tableau we have four
different options in order to do that and we can find those options in the filters so it doesn't matter which one
you're going to pick let's go with the context filter for example right click on it and here we have the option of
apply to worksheets and here you can see the four options as a default TBL going to leave it as only this worksheet this
means locally only for this View and here we can see other options like all using related data sources all using
this data source and selected work sheets before we try those options first let's understand those four options
all right so now we're going to have very simple example in order to understand how to apply filters so we
have two data sources DS1 and DS2 and we have different worksheets that are connected to those data sources so we
have the sheet one connected only to the data source one and the sheet two connected to both DS1 and DS2 using data
blending and the sheet three only connected to DS2 and now let's say that we are at the sheet one and there we
created the filter so now let's learn how to apply this filter in different worksheets using those methods all right
the first option we have only these worksheets that's mean this filter going to be only locally available for the
sheet one we will not find it in the sheet two or in the sheet three and this option is as well a default in Tableau
so each time you are creating a new filter in Tableau it's going to be using this option only this worksheet going to
be only available in the worksheet where we have created the next option we have in Tau all using this data source so for
example the sheet One is using the DS1 that means the filter going to be applied in all worksheets that are
connected to the data source one so in this example we have the sheet one because it's connected to DS1 and as
well the sheet two which is connected as well to the data source one but the sheet three is not connected to the data
source one it's only connected to the two so that means this filter will not be found in the sheet three so that
means we are training now the filter in all worksheets that are using the same data source let's move move to the next
one we have all using related data sources if you are going to use this option you're going to find your filter
almost in all worksheets in your workbook so we're going to find this filter in the sheet one we're going to
find it in the sheet two and as well in the sheet three so that means if you are using this option we are automatically
spreading our filter in almost all worksheets let's go to the last one and it is interesting one selected
worksheets this means we can go and manually selecting which worksheets can include my filter so for example I could
say I want to see my filter in the sheet one and as well in the sheet three without any rule so as you can see we
have here more control where we our filter can be applied and the last two all using this data source or all using
related data source there is like a rule and Tableau going to go and automatically spreads our filters in the
worksheets in my project I tend to use selected worksheets more often than the other ones because I would like to have
control where my filters should be appear in which worksheet so that's all about the concept of those
four options now let's go back to Tableau and try those options all right guys so back to our
filters we're going to go to the category we're going to stay with a context filter right click on it and go
to the apply to the worksheet and you can see the selected option here is only these worksheets this one is a default
so with that it means this context filter going to be found only in these reports if we go to the other reports we
will not find it so in in order to change that we're going to go again to the context filter right click on it and
let's try now all using this data source so let's click on it and now if you take a look to our filter we can find a small
icon that indicates this filter is used in different worksheets that are using the same data source in this view we are
using the big data source as you can see we have it as primary data source so any worksheets any view is using this data
source this filter going to be applied on it so let's go to the different views over here so we're going to switch to
this one you can see we have the context filter and as well the first one since both of them are using the big data
source and the filter going to be applied automatically on it but now let's create a new view where we are
using different data source so let's switch to the small data source and let's take anything so let's take the
first name and as you can see the filter going to stay empty because the big data source is not used in this view but now
let's go and use the big data source and see what table going to do so let's remove move the first name switch back
to the big data source and take as well anything let's take the last name as as I'm dropping in this view this data you
can see table automatically going to bring me the context filter because it must be used in all worksheets that is
using the big data source which is really useful if we have different worksheets using the same for example
context filter so instead of creating the same filter over and over again we can create it in one worksheet and then
spread it to all sheets that that are using the same data source okay so that's all for this option let's go back
to our context filter and try something else let's switch the apply to all using related data sources let's try this one
so click on that and now you can see that we got a new icon from Tableau indicates that this filter going to be
applied to all worksheets with the related data source so now let's go and check what can happen to the other
sheets using this option we going to find now this filter almost everywhere so in the first sheets you can see we
are using the same data source so it's going to be like this we have the context filter applied to the view in
the second sheet we're going to see again the same context because we are using the same data source let's go now
and create a new sheet where we're going to use the small data source so we are using different data source so click on
that and let's take for example the first name to the view so now as we can see in the filters we have our context
filter even though that we are using different data source we are not using the big data source but Tableau brings
this filter here here because we are using this option but as you can see it's red so what is going on over here
in the filter if you Mouse over it it says data sources that contain logical tables cannot be used as a secondary
data source for data blending since these filters comes from other data source from the big data source Tableau
has to make a data blending between them in order to connect it and it will not work if you have in the secondary data
source a logical data model as you know in our big data source if you switch to this page over here we have a data model
we have a logical model where we connected the customers with the orders and so on Tableau don't like it as a
secondary data source that has a data model so it will not work but if you have only one table or if you have like
multiple joints at the physical layer this going to be working so if you go back again it's going to stay red as
long as the secondary data source has a logical data model but if you have one table everything going to be fine you
will not get this error all right so with this option as you can see with whether you are using the same data
source or different data source our filter going to appear so now let's go and check the last option so let's go
back to our view over here go to the context filter right to click on it apply to worksheets and now we're going
to go to the selected worksheets so let's click on that all right so now we have a very simple table where we have a
list of all worksheets and as well descriptions about the data sources and some details so now we can go and
manually select which worksheets can include our filter so as you can see we have like everything is selected because
we use the option of related data sources I don't want that so I'm going to deselect everything and start from
the scratch so I would like my filter to be at the first one the second one and this one is like grade out because we
are currently in this worksheet so it's anyway selected and the other ones I'm going to leave it deselected so that's
all let's go and select okay so now if you check the filter again we can find a new icon that indicates this filter now
is used in different worksheets that we manually selected so let's visit the first report we can find our context
filter the secret one the same the third one anyway because we have here created this context filter but now if you go to
the different worksheets you will not find this context filter and as I said earlier I use this option a lot in my
projects to have control in which worksheets I want to see my filters so generally speaking those options are
really great way to share your filters in different worksheets and solve the problem of having creating the same
filters over and over again all right guys so now we're going to talk about how to customize our quick
filters but first let's understand what are quick filters any filter that you are presenting in the view in the
visualizations for the end user to interact with the view considered to be a quick filters for example all those
filters on the right sides in the view are quick filters we have the subcategory the sum of the profits those
stuff are quick filters and the users can go and start selecting the values inside those quick filters to interact
with the visualizations so now in order to customize those quick filters we're going to go over here in this small
arrow and click on it and here we will get a long list of many options on how to customize our quick filter and they
are as well splitted into groups the first group is about how to customize the quick filter the next set of options
is about the filter mods then we have here on many options about which values can be presented in the quick filter so
we have only relevant values all values in context all values in database so now we're going to go and focus in these
groups of options but first we have to understand the concepts behind them all right so as we learned before
we have a data source and a worksheet inside the worksheet we have a context filter and visualizations the data going
to be sent from the data source to the context filter and then the visualization going to be querying the
context data and the result going to be sent back to the visualization now inside the view we can create a filter
now the question is which data going to be presented inside this filter and here we have many options the first one is
we're going to get the values from the database all values in database so with that the values going to be queried
directly from the data source with that we are skipping anything inside the worksheet so we are skipping the data in
the context filter and as well in the visualizations so doesn't matter what we are doing in the worksheets the value is
going to come directly from the data source all right so this is for the first option when we say database it
means the data source informations the next option we have all values in the context so this time the values in the
filter going to come directly from the context filter as we learned before the context filter going to generate a
timberl view or timberl data inside the worksheets so here the Valu is going to come directly from the context filter
and anything that going to be done inside the view will be not considered in the values in the filter so with that
we are skipping the visualizations level we are getting the data directly from the context filter and not from the data
source all right so that's all for this option the next one going to be only relevant values so the values for the
filter now going to come directly from the view from the visualizations that means any interaction that we are doing
in The View any filtering going to affect directly the values that are presented in our filter so as you can
see those options are really helpful and Tableau gives us now the control in which data can be presented in our quick
filters because as you can see in Tableau we have different layers and different stages and the subsets and the
size of the data can be different from one to another so normally the size of the data in the data source is way
bigger than the context filter with that you are defining and you are controlling which data going to be presented in my
filter all right so now back to our view now in order to practice those options what I'm going to do we're going to
bring new quick filters to our view so let's take the country right click on it show filter and we're going to get as
well the city let's go over there and we can change the order over here so we're going to bring first the country then
the city and the subcategory I'm going to remove those measures from the filters so let's just remove them and
with that we have those filters so now we're going to go and and check which options do we have inside the quick
filter City so go to the arrow and as you can see the current value is all values in the hierarchy and that's
because the city is part of the location hierarchy but now we're going to go and change it to only relevant values so
let's go and do that and now if you take a look to the values inside the cities we can find almost all the values from
the data source so nothing changed yet but as we start now interacting with our views the values in the city start
reacting to our selection for example let's go to the country over here and start removing some countries
so we're going to deselect France Germany USA as you can see the values inside the city is reacting to our
selections so it's like those two quick filters are connected to each others and this is exactly what the option of only
relevant values can to does to our quick filter and this is exactly the purpose of this option only relevant values
anything that you are doing in the view the values inside this quick filter going to be refreshed and updated with
the current selection and now of course if we go and deselect Italy what's going to happen the filter City going to be
completely empty like our view so it is reacting to our interaction now we're going to go and change it to another
option so let's go over here on the arrow and now we can to change it exactly to the opposite show all values
in the database so let's click thats and now what's going to happen tblo going to go to the data source and bring all the
informations about the city and put it on the filter regardless what we have selected in the view or whether we have
a context filter and so on so now we have a list of all values in the city that is available in our data source and
it will not be refreshed or updated if we are clicking around or interacting with our view so for example if I'm
adding any other cities or I'm changing any other filters for example I'm removing all the subcategories you can
see it's static nothing going to be changed in the city because is go to the data source get all the data from there
and that's it so this is really nice in order to optimize the performance in Tableau and reduce the resources that
are used in those quick filters so now let's go and check something else we going to go and select the all values in
the context so let's click on that so that means the values inside the cities is responding only to the context filter
since our context filter is based on the category we have to bring it to the view in order to change the values so let's
go to the category right click on it and show filter so now we have our context filter on the right side all other
filters are dimensional filters so now the values from the city going to interact only with the category not with
the country and the subcategory so now let's try that for example if I go to the country I remove all the values you
can see the values in the view did disappear because we are not selecting any data but the values in the city
still are there so let's go and select everything the same for the subcategory if I remove everything from the
subcategory you see the city is not reacting so it's still static because it comes from the context filter so now
let's bring everything back but now if I go to the category to our context filter and let's remove office supplies once I
remove it you can see now the city is reacting to our view so we don't have any values because we are not selecting
anything from the category so here you can see there is like connection only to the context filter but not to the other
filter and this is exactly what going to happen if you make the city depending to the context filter all right so with us
we have learned the three main options in order to control which values going to be presented in our quick filters but
as we started with the city we saw that there is another option called all values in the hierarchy it was the
default one so let's go and select that once we do it what we are doing now we are connecting the dimensions that are
in the same here if you check our data Bane we have hierarchy that we created previously it is the location hierarchy
and inside it we have four dimensions so we have the continent country City postal codes now all those four
dimensions if we use it as quick filter they're going to be connected to each others so let's check the example now we
have the city and the country in the same hierarchy and they are connected to each other and in the category it's our
context filter it's empty but still the city is showing values so that means the city now is this disconnected from the
context filter or from any other filter that is not in the same hierarchy so if I go and select here any values in the
category you see nothing is changing in the city even if I remove everything but the city going to react once and start
deselecting or selecting values from the same hierarchy so if I remove France Germany USA you can see now we have only
the cities from Italy so they are like connected to each others but here we have something special about the
hierarchies since as we learned we have Dimensions levels so the country is higher level than the city so the lower
level Dimensions will not affect the higher level Dimensions only a higher level Dimension can affect the lower one
so what I mean with that let's go to the country select all the values so as you can see now we have here in the cities
all the values but if I start deselecting any values from here you can see the country is not reacting for it
because it's higher Dimension even if I go and deselect everything I still have the four countries so that means since
the city is lower level than the country it will not affect the country but if we bring now a higher level than the
country which is the continent let's see what going to happen so we're going to go to the continent right to click on it
and show filter I'm just going to bring it over here and now as I'm start deselecting stuff in the continent as
you can see the values in the country are affected with my selection because of the hierarchy the content is higher
level than the country so with that as you can see this is what going to happen if we have all values in
the hierarchy you have to pay attention to the levels of the dimensions and those Dimensions going to be connected
to each others so with us we have covered all those options that we could use in order to control the values
inside our quick filters okay so now we're going to talk about a different group of options that
we could use in order to customize our quick filters we have the filter modes so we have have single value list single
value dropdown slider custom list and so on in order to learn that we're going to have the following example so what we're
going to do we're going to go and clean up our filters I'm going to remove the country the city and the continent and
we're going to have the subcategory and category and we're going to bring as well the product name as a filter so
right click on it and let's go with show filter and now we have the quick filters on the right sides we have the product
name I'm just going to bring it over here so it look like the hierarchy so it started with category subcategory and
product name let's show all the values over here and for the product name I'm going to change the modes to a drop down
or list all right so now let's start with the first quick filter the category and try those modes we're going to go to
the arrow and as you can see as a default it is multiple values list so as you can see we have the list again here
as a single value so we have the same option once a single value and other is as multiple value the same goes for drop
down we have drop down single value and drop down as multiple values so let's try those stuff out so we're going to go
to the single value list and as you can see now the visual of the filter did change to radio buttons and now as I'm
selecting those values inside the category as you can see we can select only one value as the name says it's
only single value list so that means we are making some kind of restrictions only one value is allowed but if you
want to have multiple values as a list we're going to go and change it back to multiple values list and here of course
you can choose different values and different categories without any restrictions so this is about the modos
list single value or a drop- down list okay so now let's go and try another mods we going to take this time single
value drop down so let's switch to this one and as you can see with the drop down you will not find all the values
immediately in the view you have to click on the drop- down menu over here and then you can select the values since
it's single value again here we can select only one value we cannot select multiple values so I can select one
category at a time and as you can see it is working let's switch now to multiple values drop down we're going to have
again here the same thing we have a drop down menu but inside the menu we can select multiple values so that's it for
the drop down all right so now let's move to another filter modes we have the single value slider so let's select that
and with that you can have a slider we can move it to left and right to have different values but it is not really
interesting for a dimension with string values we can use it for numeric or dates because this is not really nice to
have a slider for values it's better to use the drop down or a list for string values so that's it for the sliders I
really use it in the projects so now let's move on to another one we have the custom list but I will not use it in the
category let's go for the product name and use a custom list so click on that and now as you can see now the product
name don't have any values we cannot see anything we have only a search box so now we can search for a value like for
example let's search for apple and then hit enter you can see now a list of all products that contains the name Apple so
it's like searching inside this field so if you can go over here and start selecting the values that you want to be
in the filter so as I'm clicking over here on those boxes I'm going to see a list of all values that I'm selecting so
with that we have created our list using the search box but here we are not seeing any data because of the categor
so I'm just going to switch it back from the slider to multiple values list I'm going to select everything and now we
can see that we are selecting only the subcategory phones because we selected over here the Apple so with this type of
list the customers can go and select their own list so we can go and add more stuff like Samsung over here so let's
search I'm going to add those products as well to the list and with that we are abending or adding more products to the
list if you want to clear everything we can go over here and clear the list so this is really nice way to search for
specific value especially if you have a lot of values inside the product name and now let's go and and try the last
option that we have in the filter modes we have the Wild Card let's go and select that and now we can see that we
have again a search box where we can enter a value but now we are searching for specific pattern in our data in
order to show you how this works we're going to get the product name as well in our view and now we're going to go and
search for specific pattern for example I want to search for all product that starts with the character a so in order
to do that we're going to go over here enter a after the a it doesn't matter which character going to comes after
that that's why we're going to use the character star so let's go with that and then hit enter so we can see at the
product name Tableau did filter the data depending on our pattern our search pattern so we can see over here all the
products that starts with the character a so let's go and have another example let's say we want to start with a P then
doesn't matter which character going to follow up we're going to have the star let's hit enter we have here only four
products that follow this pattern and it is the word of Apple or we can search for the last characters so let's say
that it should end with s so instead of having the start at the end we're going to have the star at the start so we have
star then s then let's hit enter all those products end with the S character so if I just like move it over here some
of them are really long names so you can see for example here bookcases it ends with s and all those products ends with
the character s so this is how this modes works the wild card we can use it in in order to search for specific
pattern in our data and again this is really helpful if we have a dimension with a lot of values we can use this
search box to find the specific data that we need so with that we have covered all different modes that we have
in this category in order to customize our quick filters all right so now let's move to
another set of options to customize our quick filters in each quick filters we have a lot of informations for example
we have this extra button called all or we have a title or we can search for specific value or we can reset stuff and
so on so we can customize all those informations in Tableau let's go over here again and then we can go to the
customize and now we can see all those options so show all values this is exactly the first value that we can
select so if you deactivate it we can to have only the values from the dimension from the filter but sometimes it's
really nice for example here in the subcategory if you are like you want to deselect a lot of values so you just can
go and deselect the all with that you are removing all the selections and then you select specific stuff so with us we
can select the values really fast let's move to the next one we have this small search icon so as you go over here you
can search for example for Arts hit enter then you're going to get the value inside this Dimension and if you want to
hide it and notu it for the users for some reason you can go over here on the customize and then deactivate it so once
you deactivate it you can see the small icon disappeared but I think it doesn't harm to to have it in each quick filter
so let's activate it again so as you can see with those options we are customizing our quick filter let's check
another option let's go to customize and here it's very interesting to have the show apply button so let's select that
and once you do it you're going to get two new button cancel and apply so as I'm selecting now in my filter as you
can see nothing is changing in the view so that means it will not send any query to the data source or the context filter
to get the data so nothing is changing as long as I'm not clicking here on the apply so once I click on apply the
filter going to send a query to the Tableau and Tableau going to answer with data this is really nice if you are
going to select a lot of values so each time you are selecting a value tblo going to do the calculations maybe it
makes sense first let me select everything and then do the calculations and if you don't activate this option
like in the category each time we are selecting and the selecting from the filter Tableau has to react to our
interaction so with that we are generating a lot of calculations in Tableau as we are clicking around but
over here as we are selecting the values nothing is changed until we decide to say okay I'm done now go and do the
calculations this is again really nice way to reduce the unnecessary calculations in Tableau all right so
what else we can customize in our quick filters is the title so we can decide whether you want to show a title or not
or you can edit the title name itself so if you go over here you say Okay instead of subcategory I'm going to have like
minus between them and make everything small for some reason so let's click okay as you can see now the title did
change but the data set's name didn't change so if you go to the subcategory the name stays as it is we just renamed
the filter name all right so with us we have covered now almost everything on how to customize our quick filters in
Tableau now I'm going to show you the best practices of Tableau filters that I usually follow in my projects let's go
the first tip that I have for you is to utilize those filters so the extract filter data source filter and the
context filter I saw a lot of projects where developers really forget about them or ignore them because they are not
really important in the visualizations but they are very important for optimizing the performance in Tableau so
my advice here is for you to always have a discussion with the end users about promoting one of those filters that you
have in visualizations to be first an extract filter if it cannot be an extract filter then the data source
filter and the last option to optimize the performance is to bring it as a context filter because sometimes in the
visualizations you really don't need all the data you don't need like for example 10 years of data in the visualizations
so try to discuss it with the users to say maybe let's bring only two years of data to the visualizations and then you
can utilize an extract filter or data source filter in your workbook which can has a great impact on the performance
overall in so don't forget or ignore those three filters the second filter tip that I
have for you is about optimizing the performance in Tableau which is avoid using only relevant values in your quick
filters so for example if we go to the subcategory over here we can see that it is currently set to only relevant values
if you use this option for all your quick filters what can happen the performance in tblo going to be really
bad and everything going to be really slow so we can go and switch it to something else like all values in
database or in context so we can go and switch that and with that you're going to reduce the stress on the memory and
the resources in Tableau but let's understand why all right so now let's understand what going to happen in
Tableau if you're using your filters all values in database or in context it's the same so once the viewers or the
users start the reports if you're going to send only one query to the data source and the data source going to
answer with the results pack so that means we're going to have only one initial query as the user starts the
view but in the other hand if you are using only relevant values what can happen the view going to keep sending
queries after query to the data source always to get an update and refresh in the view so that means the view going to
keep sending multiple queries for each user interactions which can to really impact the performance in Tableau
because each time the users is clicking something or interacting with the view the view going to keep sending queries
to the data source to get an update about the interaction which going to use a lot of resources and memory in Tableau
and going to slow everything down because each time the user is clicking something in the view or and interacting
The View going to keep sending queries to the data source which going to consumes a lot of memory and resourc
from Tableau and it's going to slow everything down so be careful with your quick filters if you're having
everything on only relevant values things might be slow so if the users are suffering from Bad performance in
Tableau maybe think about switching all those filters to all values in context or in the
database I have another filter tip about optimizing the performance in Tableau which is avoid using Dimensions with
high cardinality as quick filters those Dimensions might impact the performance in Tableau but first let's understand
what is cardinality so cardinality is the number of distinct values in a field for example in our database we have the
customer ID we have around 8 00 customer ID and we have a lot of products names so those two Fields considered to be
high cardinality dimensions in the other hand we have another dimensions for example the category we have only three
values or the countries in our database we have only four countries and the subcategory as well we have only 17
subcategories those Dimensions considered to be a low cality and if you are using them the performance going to
be okay but if you are start using those Dimensions with high cality the performance might be bad so the best
practice here is to avoid using High cardinality all right so back to our quick filters in our view as you can see
the category and the subcategory there are dimensions with low cality so it's fine to leave it at the view but the
product name it has a lot of values it is Dimensions with high cality and it's really worth to discuss it with the
users whether they really need such a filter in the view and if you find out no one needs it just remove it from The
View just to have a good performance at tableau now let's move to the next filter tip is
that let's say that the users really want to see the product name or the customer ID any Dimension with high
credity in the view so here the tip is to change the filter modes so instead of having a drop- down list or a list we
can use a wild match for Dimensions with high cardinality so why having a list of all the products or the customers in the
view is a bad thing in Tableau or bad for the performance well each time Tableau has to go to the data source or
to the database and prepare a distinct list of all the customers or all the products to be presented in the view so
instead of having a list we could go and change it to Wild Card match and as you can see tblo is not preparing anything
so we don't have any values to be presented in the view only if the customers start interacting with the
quick filter then after that t going to go to the database and brings the relevant values and with that we are
avoiding using a lot of resources and unnecessary calculations in Tableau so if you have a Dimensions with high
cality either avoid using it or if you want to use it just use the Wild Card match all right so let's move to the
next p practice in Tableau is as well about optimizing the performance in Tableau which is start using the apply
buttom in your quick filters because if you don't use it let me show you what's going to happen each time I'm
deselecting something it is like a query sent to the data source so this is one query second query third query fourth
query and so on so each time I'm clicking on my filters there will be generated a lot of query to the data
source which is consuming a lot of performance so instead of having such a filter we can customize and add the
apply button so as we learned before we can go over here then customize and show apply button so now as I'm clicking on
those values in the filter no query is generated to the data source so we are not using any resources in Tableau and
once I'm done selecting what I need then I'm going to hit okay or apply what going to happen one query going to send
to the data source to bring the result to the view so with that we are reducing the number of queries that our
visualizations is generating a tableau which is really great for the performance so my recommendation here if
you have a filter like the subcategory or a dimension with high cality where you are using a list use apply buttom
because the users will not select only one value they usually select multiple values and then at the end they can
apply but a filter like the category we have only three values like it doesn't Worth to use apply buttom it's only
three so the user is going to maximum like generate three queries so it's fine to not use apply buttom with the
dimensions with really low cardinality so with the high cardinality or medium cardinality like the subcategory go and
use apply button all right the next filter tip that we have is as well about the
performance in Tableau which is avoid using exclude and always use include if it is possible so for example if we go
to the subcategory we have here the option of using include or exclude so if you're using exclude values those
queries that are going to be generated in Tableau are more complex than include more complex means more resources and
might slow down the report or the view in Tableau so avoid using exclude when it's possible so I'm going to switch it
back to include which has better performance all right so let's move to the next one
and I promise you this is the last one about the performance which is minimize the number of Quick filters in your view
those quick filters going to take not only the space in the view but also going to generate a lot of queries a lot
of stress going to bring the whole performance in t down so try to avoid using a lot of quick filters and discuss
with your users each time they need new filters whether it's really necessary to put it in the view because I saw a lot
of of roject Dos the users always wants a lot of filters so try to discuss them and not always bringing a new quick
filter to the dblo because you're going to end up having really bad performance in the view and no one going to be happy
having bad response time in the visualizations so try to minimize the number of Quick filters in Tableau so
that everyone is happy so now let's bring more filters to our view we're going to go for example
and pick the order dates I'm going to show it as a filter let's take the location informations the country and as
well maybe the city and now we have to start sorting those informations I usually start in my projects with the
first filter is the date or the time aspect that we have in the visualization and here we have only the order date so
we're going to drag and drop it on the top because the usually the users going to start thinking which date which year
I want to see in my visualizations so they going to focus always first on the time and the date as
and after that we have two kinds of informations or two hierarchies in the quick filters so we have here the
location informations we have the city and the country and then here below we have the informations about the product
and as well the our hierarchy so here we have to not mix them together so separate them first start with the topic
for example the location so first we're going to talk about the city and the country and then we're going to talk
about the product informations and here follow as well The Logical order in our hierarchy so our hierarchy starts for
example with the country as a higher level than the city so start always with the higher level then move down to the
lower level so for example here we should bring the country and top and then the city should be below it and if
we take for example the postal code let's have it as well in the filter the postal code should be below the city so
as you can see in the quick filter we are rebuilding The Logical order of the levels in the hierarchy the same goes
for the product so we have first the category the subcategory then the product name here everything is fine so
with this add the user is start filtering the data they start from top to down so there's like logical order of
the field which really makes sense all right so let's move to the next filter tip that we have to not use
all values in Dimensions with very low cardinality so what I mean with that for example let's check the country the
country has only four values and really it makes no sense to use all because it's only three values or four values
and the users can go and select those values without now selecting all or deselecting all so this Dimensions is
really low cality and we can go and remove this option so let's go to the customize and remove it with that we
have like more space to show to the users and this option usually take a lot of space all right so let's move to the
next one to the city and let's check the values as you can see we have a lot of values and here it makes sense to leave
it as it is so we're going to leave the all values the postal code AS will it's like relative high cality so we're going
to leave it the category here we have only three values so it really makes no sense to use the all values so I'm going
to go and remove it as well from here and with that we have now more space we didn't waste space for that the
subcategory here let's make it bigger a little bit and see you can see we have yeah a lot of values and it makes sense
to select all sub categories or deselect so I'm going to leave it for that so that means we just change that for the
CATE Dee and the country which is really Dimensions with very low cardinality all right so now we're going
to move to the final filter tip that I have for you that I usually use in my projects which is as well about the
design and the look and feeling in Tapo so here we're going to use the suitable filter modes in the quick filters so
let's see what I mean with that first we're going to start with the order dates or with the date that we have
usually in our view I usually tend to use here like a continuous field instead of a list of distinct values so what I
mean with that I usually go over here on the year of order dates right to click on it and convert it to continuous so
with that we going to have like a range between two values which can has as well less space in Tableau so let's go and
switch it so now as you might already notice the order date the quick filter did disappear because we changed the
role from discrete to continuous so let's go and show it again and as you can see now we have the quick filter
very minimum and not taking a lot of space so this is really nice as a start to have a range between two values for
the date let's move to the next one we have the country so the country is a Dimensions with very low cardinality and
here I tend always to use a list with multiple values so everything here is correct let's check that so it is
multiple values list so I'm going to leave it as it is the next one we have the city here we have a lot of values
and here we can only see like three values from the whole filter doesn't make sense to have it as multiple value
list instead of that I going to say this is dimension with medium cardinality we're going to always tend to use a drop
down for that so I always keep this single value it's like restriction that's has no meaning so we're going to
go with the multiple value drop down and with that as you can see we have a minimum space we have only like one
value that we can see so if the users want to select the cities so the users is going to go and select the values
that the needs and then close it so it's really minimum and don't take a lot of space the next one we have the postal
code as well here we have the same situation a dimension with a medium cality we have like a lot of values so
we will not leave it as a list we're going to have it as a drop- down menu so as you can see the size compared to the
city is really big in the visualization so we're going to go as well over here and change it to multiple values drop
down the next one is the category it's exactly like the country only three values very below cality we're going to
leave it as it is and I think for the subcategory you already know that it has like medium cality we're going to go
over here and make it a drop down so now we're going to move to the last one we already talked about it the product name
is huge and has a lot of values the best practices here is to use Wild Card match for this value and for example let's
take another one let's take the first names so I'm going to show the filter over here and we're going to bring it
just down the last one the product name this as well is a huge filter it has a lot of values and here
is as well Dimension with high cality so we're going to go and switch the modes to Wild Card match exactly like the
product name so as you can see we have now a lot of filters which is not really good for the performance but we saved a
lot of spaces as we change the filter modes so with that we have really nice quick filters on the right side not
taking a lot of spaces so with that I covered all the tips and tricks or best practices that I usually use in Tableau
projects if I'm using filters now I'm going to show you the best practices of Tableau filters that I
usually follow in my projects let's go the first tip that I have for you is to utilize those filters so the extract
filter data source filter and the context filter I saw a lot of projects where developers really forget about
them or ignore them because they are not really important in the visualizations but they are very important for
optimizing the performance in Tableau so my advice here is for you to always have a discussion with the end users about
promoting one of those filters that you have in visualizations to be first an extract filter if it cannot be an
extract filter then the data source filter and the last option to optimize the performance is to bring it as a
context filter because sometimes in the visualizations you really don't need all the data you don't need like for example
10 years of data the visualizations so try to discuss it with the users to say maybe let's bring only two years of data
to the visualizations and then you can utilize an extract filter or data source filter in your workbook which can has a
great impact on the performance overall in Tableau so don't forget or ignore those three
filters the second filter tip that I have for you is about optimizing the performance in Tableau which is avoid
using only relevant values in your quick filters so for example if we go to the subcategory over here we can see that it
is currently set to only relevant values if you use this option for all your quick filters what can to happen the
performance in tblo going to be really bad and everything going to be really slow so we can go and switch it to
something else like all values in database or in context so we can go and switch that and with that you're going
to reduce the stress on the memory and resources in Tableau but let's understand why all right so now let's
understand what going to happen in tableau if you're using your filters all values in database or in context it's
the same so once the viewers or the users start the reports if you're going to send only one query to the data
source and the data source going to answer with the results back so that means we're going to have only one
initial query as the user starts the view but in the other hand if you are using only relevant values what can
happen the view going to keep sending queries after query to the data source always to get an update refresh in the
view so that means the view going to keep sending multiple queries for each user interactions which can really
impact the performance in Tableau because each time the users is clicking something or interacting with the view
the view going to keep sending queries to the data source to get an update about the interaction which going to use
a lot of resources and memory in Tableau and going to slow everything down because each time the user is clicking
something in the view or and interacting The View going to keep sending queries to the data source SCE which going to
consumes a lot of memory and resourc from Tableau and it's going to slow everything down so be careful with your
quick filters if you having everything on only relevant values things might be slow so if the users are suffering from
Bad performance in Tableau maybe think about switching all those filters to all values in context or in the
database I have another filter tip about optimizing the performance in Tableau which is avoid using Dimensions with
high cardinality as quick filters those Dimensions might impact the performance in Tableau but first let's understand
what is cardinality so city is the number of distinct values in a field for example in our database we have the
customer ID we have around 800 customer ID and we have a lot of products names so those two Fields considered to be
high cardinality dimensions in the other hand we have another dimensions for example the category we have only three
values or the countries in our database we have only four countries and the subcategory as well we have only 17
subcategories those Dimensions considered to be low cality and if you are using them the performance going to
be okay but if you are start using those Dimensions with high cality the performance might be bad so the best
practice here is to avoid using High cardinality all right so back to our quick filters in our view as you can see
the category and the subcategory there are dimensions with low cality so it's fine to leave it at the view but the
product name it has a lot of values it is Dimensions with high cality and it's really worth to discuss it with the
users whether they really need such a filter in the view and if you find out no one needs it just remove it from The
View just to have a good performance at Tableau now let's move to the next filter tip is that let's say that the
users really want to see the product name or the customer ID any Dimension with high credability in the view so
here the tip is to change the filter modes so instead of having a drop- down list or a list we can use a wild match
for Dimensions with high cardinality so why having a list of all the products or the customers in the view is a bad thing
in Tableau or bad for the performance well each time Tableau has to go to the data source or to the database and
prepare a distinct list of all the customers or all the products to be presented in the view so instead of
having a list we could go and change it to Wild Card match and as you can see Tableau is not preparing anything so we
don't have any values to be presented in the view only if the customers start interacting with the quick filter then
after that tblo going to go to the database and brings the relevant values and with that we are avoiding using a
lot of resources and unnecessary calculations in Tableau so if you have a Dimensions with high cality either avoid
using it or if you want to use it just use the Wild Card match all right so let's move to the next p
practice in Tableau is as well about optimizing the performance in Tableau which is start using the apply btom in
your quick filters because if you don't use it let me show you what's going to happen each time I'm deselecting
something it is like a query sent to the data source so this is one query second query third query fourth query and so on
so each time I'm clicking on my filters there will be generated a lot of queries to the data source which is consuming a
lot of performance so instead of having such a filter we can customize and add the apply button so as we learned before
we can go over here then customize and show apply button so now as I'm clicking on those values in the filter no query
is generated to the data source so we are not using any resources in Tableau and once I'm done selecting what I need
then I'm going to hit okay or apply what going to happen one query going to send to the data source to bring the result
to the view so with that we are reducing the number number of queries that our visualizations is generating a tableau
which is really great for the performance so my recommendation here if you have a filter like the subcategory
or a dimension with high cality where you are using a list use apply button because the users will not select only
one value they usually select multiple values and then at the end they can apply but a filter like the category we
have only three values like it doesn't Worth to use apply buttom it's only three so the user is going to maximum
like generate three queries so it's find to not use a btom with the dimensions with really low cardinality so with the
high cardinality or medium cardinality like the subcategory go and use apply button all right the next filter tip
that we have is as well about the performance in Tableau which is avoid using exclude and always use include if
it is possible so for example if we go to the subcategory we have here the option of using include or exclude so if
you're using exclude values those queries that are going to be generated in Tableau are more complex than include
more complex means more resources and might slow down the report or the view in Tableau so avoid using exclude when
it's possible so I'm going to switch it back to include which has better performance all right so let's move to
the next one and I promise you this is the last one about the performance which is minimize the number of Quick filters
in your view those quick filters going to take not only the space in the view but also going to generate a lot of
queries a lot of stress going to bring the whole performance in Tau down so try to avoid using a lot of quick filters
and discuss with the users each time they need new filters whether it's really necessary to put it in the view
because I saw a lot of roject that the users always want a lot of filters so try to discuss them and not always
bringing a new quick filter to the dblo because you're going to end up having really bad performance in the view and
no one going to be happy having bad response time in the visualizations so try to minimize the number of Quick
filters in Tableau so that everyone is happy so now let's bring more filters to our view we're going to go for example
and pick the order dates I'm going to show it as a filter let's take the location informations the country and as
well maybe the city and now we have to start sorting those informations I usually start in my projects with the
first filter is the date or the time aspect that we have in the visualization and here we have only the order date so
we're going to drag and drop it on the top because the usually the users going to start thinking which date which year
I want to see in my visualizations so they going to focus always first on the time and the date aspect and after that
we have two kinds of informations or two hierarchies in the quick filters so we have here the location informations we
have the city and the country and then here below we have the informations about the product and as well the our
hierarchy so here we have to not mix them together so separate them first start with the topic for example the
location so first we're going to talk about the city and the country and then we're going to talk about the product
informations and here follow as well The Logical order in our hierarchy so our Hier starts for example with the country
as a higher level than the city so start always with the higher level then move down to the lower level so for example
here we should bring the country in top and then the city should be below it and if we take for example but the postal
code let's have it as well in the filter the postal code should be below the city so as you can see in the quick filter we
are rebuilding The Logical order of the levels in the hierarchy the same goes for the product so we have first the
category the subcategory then the product name here everything is fine so with this ad the user is start filtering
the data they start from top to down so there's like logical order of the field which really makes sense
all right so let's move to the next filter tip that we have to not use all values in Dimensions with very low
cardinality so what I mean with that for example let's check the country the country has only four values and really
it makes no sense to use all because it's only three values or four values and the users can go and select those
values without now selecting all or deselecting all so this Dimensions is really low cality and we can go and
remove this option so let's go to the customize and remove with with that we have like more space to show to the
users and this option usually take a lot of space all right so let's move to the next one to the city and let's check the
values as you can see we have a lot of values and here it makes sense to leave it as it is so we're going to leave the
all values the poster code as well it's like relative high cality so we're going to leave it the category here we have
only three values so it's really makes no sense to use the all values so I'm going to go and remove it as well from
here and with that we have now more space we didn't waste the space for that the subcategory here let's make it
bigger a little bit and see you can see we have yeah a lot of values and it makes sense to select all sub categories
or deselect so I'm going to leave it for that so that means we just change that for the category and the country which
is really Dimensions with very low cardinality all right so now we're going to move to the final filter tip that I
have for you that I usually use in my project which is as well about the design and the look and feeling in Tau
so here we're going to use the suitable filter modes in the quick filters so let's see what I mean with that first
we're going to start with the order dates or with the date that we have usually in our view I usually tend to
use here like continuous field instead of a list of distinct values so what I mean with that I usually go over here on
the year of order dates right click on it and convert it to continuous so with that we're GNA have like a range between
two values which can has as well less space in Tableau so let's go and switch it so now as you might already notice
the order date the quick filter did disappear because we changed the RO from discrete to continuous so let's go and
show it again and as you can see now we have the quick filter very minimum and not taking a lot of space so this is
really nice as a start to have a range between two values for the date let's move to the next one we have the country
so the country is a Dimensions with very low cardinality and here I tend always to use a list with multiple values so
everything here is correct let's check that so it is multiple values list so I'm going to leave it as it is the next
one we have the city here we have a lot of values and here we can only see like three values from the whole filter
doesn't make sense to have it as multiple value list instead of that I going to say this is dimension with
medium cardinality we going to always tend to use a drop down for Dots so I always skip this single value it's like
restriction that's has no meaning so we're going to go with the multiple value drop down and with that as you can
see we have a minimum space we have only like one value that we can see so if the users want to select the cities so the
user is going to go and select the values that they need and then close it so it's really minimum and don't take a
lot of space the next one we have the postal code as well here we have the same situation a dimension with a medium
cality we have like a lot of values so we will not leave it as a list we're going to have it as a drop- down menu so
as you can see the size compared to the city is really big in the visualization so we're going to go as well over here
and change it to multiple values drop down the next one is the category it's exactly like the country only three
values very low cality we're going to leave it as it is and I think for the subcategory you already know that it has
like medium cality we're going to go over here and make it a drop down so now we're going to move to the last one we
already talked about it the product name is huge and has a lot of values the best practices here is to use Wild Card match
for this value and for example let's take another one let's take the first names so I'm going to show the filter
over here and we're going to bring it just down the last one beneath the product name this as well is a huge
filter it has a lot of values and here is as well Dimension with high cality so we're going to go and switch the mods to
Wild Card match exact exctly like the product name so as you can see we have now a lot of filters which is not really
good for the performance but we saved a lot of spaces as we change the filter modes so with that we have really nice
quick filters on the right side not taking a lot of spaces so with that I covered all the tips and tricks or best
practices that I usually use in Tableau projects if I'm using filters all right now we're going to
learn how to sort your data inside tableau a lot of people think that sorting data in Tableau is not working
correctly which is not really right so we're going to remove now this confusion and we can understand how sorting in
Tableau works so let's go okay so now let's understand what is sorting it's very simple so sorting is
arranging your data in a specific order and here we have two options either we can sort it using the ascending order
here we can arrange your data in increasing order that means we're going to start with the lowest and as we are
moving down we're going to have the highest value for example let's take the order ID we can sort it using the
ascending order then the Valu is going to be like this 1 2 3 4 5 6 so the values are increasing as we are going
down or if we have like for example the first name we have characters so it's going to be sorted from a to zed so for
example we have here Andy Dwight and end up with Spam the second option is to sort your data using the descending
order here we're going to arrange your data in decreasing order so that means we always start with the largest value
and as we are moving down we're going to go to the lowest value for example again here the order ID so we start with the
highest value for in this example it's going to be the six 54 and as I'm moving down I'm going to get the lowest value
the same for the first name it's going to be the opposite of alphabetical order so we're going to start with Pam Michael
James until we end up with Andy so as you can see it's very simple we have only two options either sorting the data
using the ascending order or the descending order so now let's go in Tableau and understand how we can do
that all right so now let's create another view from the scratch we're going to stay with the big data source
let's take as usual the subcategory in the rows and we're going to take as a measure the sales so let's put it in the
columns let's show the numbers so I'm going to take it to the labels and as well to the colors then we going to have
as well in the columns the country so let's go to the customers inside the hierarchy location we have our country
and let's put it over here okay so this is our view for now there is two ways on how to sort data in Tableau either
directly in the visualizations and we call it quick SS or we can do it as we are building the view as developers so
we're going to start the first one where we're going to learn how to do sorting using quick sorts from the
visualizations and this is what usually the users going to see as and do all right so now for quick sort in Tableau
there are three places where you can sort your data directly in the visualizations the first one is sorting
the data from the header so if you Mouse over on the header name over here you can see that we have like small icon in
order to sort your data so we can use it here to sort the header informations or the second place we can go to the access
over here and you can see as well there's like small icon to sort the data and the third one the last last one if
you go to the fill labels so if you go to any values here inside the header you can see we have as well small icon to
sort the data so those are the three places where you can sort the data in Tableau and sorting work with three
clicks the first click going to sort the data ascending the second one going to sort the data descending and the third
click going to bring the data as it is sorted from the data source all right so as a default the data can to be sorted
as the data source so if your data source is s Sting the data ascending we can have the same way at the view so now
as a default we are not enforcing any sorting in our view but we are taking it from the data source and as you can see
it is sorted already in ascending fashion because we have that from the data source so now if you go to the
header for example let's click on this icon and see what can happen as you can see nothing happened in the view because
it's exactly like the data source we have it in ascending fion so that was the first click that we done we sorted
now the data in ascending way and you can see over here we have small icon that indicates this Dimension is now
certed in the view in ascending way so let's go again over here and click again so let's see what's going to happen if I
click on it now the data going to be sorted in descending order and as well here we're going to have different icon
so we have the tables and then it ends with the accessories so now we have it descending now to go and reset
everything back to the default to the data source modus what we're going to do we're going to click the third time so
if I click again over here the icon going to be gone from the dimension and the data going to be sorted exactly like
the data source so this is how sorting in Tableau works you have three click the first one ascending the second one
descending and the last one we're going to bring it to the default as the data source all right so now we're going to
go to the second place where we can sort our data in the view and that is the axis so if you go to the axis over here
we can find this small icon and here is exactly the opposite it the first click going to sort the data in descending
order the second click going to sort the data in ascending order and the third one going to bring it back to the
default like now so let's try that we're going to click the first one as you can see now the data and the rows are sorted
in descending order we start with the highest sales and as we are moving down we're going to move to the lowest sales
all right so now let's click the second one so let's go we are now sorting the data in ascending order so we start with
the lowest sales and we end up with the highest sales and the third click going to bring it to default without any order
so let's click on that and we are back to the start where the data is not sorted at all so as you can see with the
header and the axis we are sorting the rows only so only the rows are sorted we are not sorting The Columns so France
Germany Italy USA going to stay at the same position we are not sorting The Columns and now in order to sort the
columns we going to go to the third place to the filled label so we're going to go to any of those values doesn't
matter which one and we're going to click for example on the chair you can see this small icon here again the same
as AES the first one going to sort the columns in descending order the second one ascending and the third one to the
default like now so let's go and click over here on this icon now the data is sorted in descending order so that means
the First Column going to has the highest sales then the next one going to has the lower and as we are moving to
the right we going to get the lowest value so we are sorting The Columns in descending order and as you can see as
well in the columns we have this icon over here indicate that the columns are sorted now in the view so now if we go
and click it again we're going to sort it in ascending way where we're going to start with the lowest value the First
Column and as we are moving to the right we're going to have the last one with the highest value and as well here we
can see the icon which shows that the data is sorted in ascending way and the last click as you know we we're going to
go back to the default the data is not sorted at all all right so that's all about quick sorts in Tableau it's really
simple once you understand the places to sort the data and how you can click around to sort the data in different
ways a lot of people get confused about it but it's really simple let's say that we have the following scenario where you
say you know what I don't want to offer the users this possibility to sort the data I'm going to sort everything in the
view and the users going to just see the report as I prepared it all right so now we know order to disable the Sorting
option for the users we're going to go to the main menu and then we're going to go to the worksheets and then here we
have show sort control as a default taable going to enable it which makes really sense so now let's go and disable
it and see what can happen now if you go to the visualizations you will see that we don't have any more the icons in
order to sort the data so if I go to the sales over here or I go to the subcategory or anywhere you see we don't
have any options in order to sort the data so this possibility going to be complet completely disappear for the
users so with that we have removed completely the options for the users to sew the data inside the visualizations
and to be honest I never been in situation where I have to remove this option for the users it really makes
everything static and this is exactly the opposite of what we want we want to make always our dashboards and reports
Dynamic interactives for the users and I think it's always really bad to make only static reports without having any
Dynamic inside it unless maybe the users exactly ask for this is to say okay I don't want to S the data make it static
as much as you can so you can go and disable this option so for now I'm going to go to the worksheets I'm just going
to go and show set control and enable it again as we go again to the sales you can see we got again those small icons
in order to sort the data all right guys so that's all about how to sort the data directly from the views from the users
point of view all right so now we're going to move to the second group where we're
going to learn how to sort the data as you are building the view so in order to do that there's two ways to do it
either from the toolbar or from the dimension itself so now if you move to the toolbar we have here two options
sorting ascending and sorting descending so now in order to sort those Dimensions you can click on the country for example
now we are sorting The Columns and then click over here ascending so as you can see now we are sorting the data in
ascending way for the columns and if we want to sort the subcategory the rows we can click over here and then click on
ascending or descending so as you might already notice we are sorting the data Always by the measure by the sales so if
you m hover on it it going to says sort subcategory descending by the sales so we don't have any option here to sort
the data by the header so it only sort by measures all right so that's it about how to sort the data from the toolbar
the second method is to sort the data directly in the dimension so let's go for example to the subcategory right
click on it and as you can see we have here two options about sort we have clear sort and sort so clear sort going
to reset everything to the default so let's go and do that to start from the scratch so I'm just going to clear
everything for the subcategory and then right click on it and let's go to sort with that we're going to get a new
window says we are sorting now the dimension subcategory I will just move it to the left side in order to see how
table going to react to my selection okay so what do we have over here is two sections the first one is about how to
sort the data the sort methods the second one is about the sort order ascending and descending so let's see
which options do we have we have five options the data source order alphabetic filled manual and listed let's start
with the first one the data source order here we have it as ascending so we are sorting the values inside our header the
subcategory in ascending way in alphabetical order we can reverse it by going to the descending order so as you
can see the values can to switch now if you want to go and reset everything we can go over here and click clear to go
to the default settings and that's it for the data source order let's move to the next one we're going to have exactly
the same effect because we have it as well at the alphabetical order so let's go over here as you can see nothing
going to change because we have it at descending and let's go in alphabetical order to the ascending and the header
going to switch so exactly the same effect all right so now let's move to the third one we're going to go to the
field and now we can go and sort the data by any field from the whole data source the field doesn't have even to be
on The View but of course it makes no sense to do that so here as a default Tableau is selecting the sales because
it's only measure that we have in the view it makes sense and the data is sorted in ascending way but if you want
you can go and sort the data by the number of customers inside each category or subcategory so we can go over here
and select the customer ID and the function going to be counts so the total number of customers inside each category
so now those categories are sorted in ascending way depending or based on the total number of customers so we have
this ability to sort the data by any field from the data source but it doesn't make sense of course to sort the
data like this because it's going to confuse the customers and they will not understand why those categories are
sorted like this without having like a description in the report so that's all for this methods sort by filled let's
move to the next one we have sort by manual and here you have the freedom to make the order of the dimension so for
example we can take this machines over here and as I'm moving it down you can see the order in The View is changing as
well so I can go and sort the dimension as I want so it's really simple here we don't have any rules we don't have
ascending or descending we have the complete freedom to sort the values inside any Dimension and that's it for
this option let's move to the next one and the last one we have the nested now in order to understand how the nested
sort Works in Tableau we have to work with multiple Dimensions the best ways to get hierarchy so now let's go and
create another view so I'm just going to go and close this one here let's create let's take the continent to the rows and
let's take the profits to the columns and as well as usual we're going to show the labels of our data now if you go to
the continent over here and right click on it let's go to the source and let's say we're going to sort the data by the
data source descending as you can see we are now sorting only the continent and if we drill down to the country you can
see that only the continent is sorted but the country is not sorted so if you go as well to the city you can see that
the city is as well not sorted only the First Dimension is sorted but now instead of that we can go and use the
nested sort in order to sort all Dimensions inside the hierarchy automatically so let's go and remove
those stuff so I'm just going to drill back to the continents or we call it drill up so right click on it and let's
go to sort and then we're going to go to the nested and now we're going to say okay so the data ascending and we're
going to use the measure the aggregation sum of profit in order to sort the data so now let's go and close it and with
that we got the nested sorts as you can see the continent is sorted but now if I drill down to the country let's see the
country going to be as well sorted so now if you look closely to the data you can see that the USA is the only country
inside this continent so we cannot see any sort over here but you can see that the countries in Europe are sorted
ascending so it starts with the lowest value from Italy then France then Germany so you can see the country
inside this continent is sorted as well based on the listed sorts so as you can see the countries of each continent can
to be sort separately from the countries from the other continents so this is how the nested sort Works let's go and just
put the profit and the colors as well so now let's go down in the hierarchy and drill down to the city we're going to
have more data and it's going to be more clear as you can see now the city is as well sorted and now we are sorting the
cities in one country so for example over here in USA the lowest sales is in Seattle and the highest s is in Portland
so we are sorting the cities based on the country so this is one section the next section is Italy the next one is
Germany so each country going to be sorted separately from other country so with that we have learned this method
work if we have multiple dimensions and it going to work perfectly if we have hierarchy in our view everything going
to make sense and the sword going to be very logical for the users so as I'm drilling down for example to the bual
cold or I'm rolling up back in my view everything going to be sorted in very logical way all right guys so with that
we have covered everything how to sort the data inside our views from the users perspective how to sort the data as we
are building the views and I think it's really simple and not that complicated all right so that's all about how to
sort our data in Tableau and we have completed this section in the next section we're going to learn about
Tableau parameters to add Dynamics to our visualizations all right everyone so now
we're going to talk about the parameters parameters are Game Changer in Tableau and that's because and this is my
opinion parameters are the best feature that Tableau did introduce because parameters in Tableau going to make your
visualizations very Dynamic interactive and flexible in very unique way that you cannot find it in any other bi
tool all right so now what are parameters parameters are like variables in programming languages that allows
user to replace a constant value in the calcul ations filters a reference line and so on okay so now what this really
means if you are building a view for your users you are already making a lot of decisions defining a lot of values
that can stay static and the users are allowed only to read your views so for example you might create the following
calculation in Tableau where you are defining a threshold for your qbi so you are saying if the total sales is less
than 400 then the qbi going to show red otherwise it going to show Green so here the value the 3old 400 is a static and
cannot be changed from the users the viewers only can be changed from the developer but now you might be in
situation where you have two requirements from two different users where they Define different thresholds
so here you end up making two calculations for two customers and as well creating two views but now instead
of doing that we can use the power of parameters so here we're going to replace the value 400 with a parameter
and then we're going to offer the parameter as an input field for the users in the view and now the users can
use the parameter to define the need value as it requires so using parameter going to change the behavior of your
view depending on the value of the parameter this going to make your views are Dynamic and ready for any
requirements and there are endless ways to use parameters in Tableau and in this tutorial I'm going to show you six
different use cases the first use case is about how to use parameters and calculations the Second Use case is
about the reference lines the third one how to use them in filter and we have another very special use case in how to
switch between dimensions and switch between measures in very Dynamic way in one View and another use case about the
titles and text and the last use case how to use parameters in pens all right guys so now let's start
with the first use case how to use parameters in calculations so now let's create now some kind of qbi to track the
profits by the subcategory okay so now we're going to stay with the big data source and we're going to go to the
product to get the subcategory and then we need the measure profits so we're going to go to the orders and we going
to get the profits over here okay so now we're going to show as well the labels on The View and now we can to have a
threshold or qbi where we're going to say if the profit is less than 10K then it's going to be red and anything higher
than 10K it's going to be green and now in order to create the logic and the colors in the view we have to create
calculations don't worry about how to create calculations in Tableau because we're going to have a dedicated section
for that so now in order to create the calculation we're going to go to the data pain right click on the empty space
and then choose create calculated field so let's go there and now we're going to call it qbi
colors and now then we're going to write here the expression about our logic so it says if we need sum and then we have
the profit we said if it is less than 1000k then it's going to be red so we're going to write the value red otherwise
it's going to be green so let's end it so with that we have our Logic for the colors in our view and as you can see
over here in our calculations we have a constant it is the 10K so let's go and create that so we're going to click okay
and here on the left side you can see our Dimension we're going to take it and put it on the colors and now let's go
inside and assign the values for the colors so green it's going to be green and red it's going to be red so let's
click okay so now we can go and give this report to the users and they can view it and interact with it but now as
you can see the calculations of the kpi is really static and they cannot customize it in order now to give to the
users the option of defining what is red and what is green we have to use parameters and now in order to create
parameters in Tableau there is two ways to do that either you go to the database and create your parameters or you create
in the place where you need it for example if you are creating a filter so inside of the creation of the filter we
can create parameters so now let's see first how we can create parameters in the data pane so in the data pan there
is two ways to create parameters either you go to the empty space and right click on it then you can see here create
parameter or the other option is that you go to the head of the datab ban and you have here small Arrow so if you
click on that you're going to see exactly the same drop down and here we have the option of creating parameter so
let's select that and now we have the window of creating parameters so first thing first we have to give it a name so
we're going to call it choose threshold next we have to define the
data type of the parameter and if you go over here you can see a list of all data types but here you know all of them but
tblo decided to go with float and integer instead of number hole and number decimal but they are exactly the
same so for now we're going to go with the integers we don't want to have decimal numbers in the qpi and then once
you do that we can Define the display format and here for each data type there are different formats to represent the
values so as you can see we have automatic number standards percentage currency customized I'm going to stay
with the automatic and then in the next one you have to define the default value that going to be show up in the input so
here I would say it going to be the 10,000 and of course the users can change that then after that you have
different options to limit what the users can select so the default option here is all that means you are allowing
the users to enter any value but of course we limited the data type to integer
that means the users cannot go and enter any characters in the input field or you define for the user a list of allowed
values so here you can go and allow for example five different values maybe to make sure that nothing goes wrong in the
view so here you are making the parameter more restrictive so the list is something like discrete you are
allowing a list of distinct values and the next one is something like the pin you are defining the start and the end
of the range and then you are defining the steps between those two values so for now I'm going to leave it open-ended
so the users can select whatever they want want all right so now let's go and hit okay to create the parameter and now
if you check the data pin on the left side let me just minimize those tables you can see that the parameter is going
to be created always at the end of the data pane so there is like a separator between your data and the parameters and
that's because the parameters are something that is independent from your data source so there is no dependence
between the parameters and your data set it's completely something independent and only special for the workbook okay
so now we have the parameter how we going to show it to the users so in order to do that it's really easy go to
the parameter right click on it and then we have the option of showing parameters in the view so let's select that and now
you can see the parameter input on the right side of the view so here we can see the value of 10K as a default so now
let's go and change the value we're going to have it like 500 you can see nothing change in our view so doesn't
matter what you are giving here you see that the view is not changing so that means we have now to connect it somehow
to The View and in order to do that we're going to go inside the calculations and replace the constant
value with the parameter so let's see how we can do that so we're going to go to our calculation the qbi colors right
click on it and then let's go to edit so now we have to go over here and replace this value so I'm going to remove it and
now we're going to type the name of the parameter as you can see TBL going to suggest us here and click on it so with
that any values that the user is going to give for this parameter going to be used directly in this calculation let's
try that out going to click okay so as you can see something change already in the view but let's go and play with the
values instead of 5K we're going to have like 20k that's okay and with that I just changed the threshold for this qbi
so now anything below 20K going to be red anything higher going to be green let's have another value like 50k and
now as you can see the threshold is really high we have only two values with green and as you can see it's very
Dynamic and you give the users the power of defining and customizing the kbi as they want and with that you're going to
cover a lot of requirements in only one view I just love this feature in Tableau all right so now let's see
another use case of the parameters we can use parameters in the reference line so we can show in our view a reference
line to indicate what is the thresholds just it makes it more clear where is the cut between red and green and here we
can use our already existing parameter CH the threshold in the reference line let me show you quickly how we can do
that so now let's go to the analytics Pane and then here we have the option of creating a reference line over here so
let's go and double click on it and now we have a new window to configure the reference line there are a lot of
options but now we're going to focus on the parameters what is really here important is the value of the reference
line so now let's check the option as we can see over here and as you can see Tableau here suggesting the matric the
second one is to create a new parameter the third one is to choose the already existing parameter so as you can see we
can create a new parameters exactly in the place that we need it but for now it makes really sense to use the same
parameter in the reference line so let's go and select that and now as you can see on the right side we have already a
reference line in our view and we have the label of choose thresholds so instead of showing the labels we're
going to show the values of the parameter in order to do that we're going to go to the labels and we're
going to change this to Value so let's select that and that's it for now let's go and click okay so as you can see we
are showing now the threshold as a reference line and if we go and change the value of the 50k to let's say 10K
let's go so now as you can see the user can control everything in The View with their input in the parameter they are
changing the calculations as well the reference line it's really cool and professional to have this Dynamic on
your reports so this is how you can use the value of the parameter inside the reference
line all right so now we're going to go to the next use case where we going to use the parameters in filters and we're
going to learn as well how to create parameters exactly in the place where we need it so now we're going to go and
create a reports where we're going to show the top 10 products in our data sets so in order to do that we're going
to stay with the big data source and let's go to the products and we take the product name so double click on it so
now we have a list of our products and what do we need is a measure so we going to go to the orders and we're going to
take the sales so drag and drop it over here as usual let's have labels and I'm going to sort it descending and now we
want to show only the top 10 products and in order to do that we're going to take the product name in the filters so
we can drag from here by holding control and then drop it on the filters so now in the filters over here we want to show
the top 10 products in order to do that we're going to go to the tab top and now we're going to go and Define the rule
everything is fine so here you can see top 10 pi sales so now as you can see we are defining a rule and in this rule
it's like the calculations we have a constant and the constant in this rule is the 10 so now you might be in the
same situation where you have one user asking for top 10 products and another user asking for top 20 products so now
instead of going and creating two different filters two different views we can stay with the same view and use
parameters and then you're going to give the end users to Define their list so now we have to change the value of 10 to
parameter so let's click over here and here you have always the three options either the value you enter or you can
create a parameter or use already existing parameter so now we want to create a new parameter for this View and
as you can see this is the second method on how to create parameters so we will not go to the datab Bane we're going to
create it exactly where we need so let's go and click create a new parameter so now we have here again the same window
where we're going to create a parameter we're going to call it choose top end product and now you might notice that
you cannot change the data type because we are creating here a parameter inside the filter for the sales and the sales
is measure and the number but the same here you can customize the display format the current value and as well
which values you can allow with everything or a range so now let's try the range the minimum going to be one
the maximum going to be 50 and we're going to have a step size of five all right so that's all let's click okay so
now let's check again the rule we have Tob then our parameter by sales so that means we don't have a constant value and
we are using the parameter let's go and hit okay so now as you can see the report is showing the top 10 products
because the default value of the p parameter is 10 and if you check the left side we have a new parameter called
choose top end products great so now the next step is to show the parameters for the users so right click on it and say
show parameter all right so now let's check our parameter now it's showing 11 I thought I gave it like 10 so let's
edit it again right to click on it and then let's go and edit ah all right because we played with those values so
as you can see it's like pens it starts from 1 6 11 and so on because the size is five so what we're going to do is to
change this to zero and then as you can see we have here again a 10 so let's click okay all right so now I promise
you we have top 10 because if you check the value here on the parameter it's 10 all right so now this is something
different instead of having input field here we have like a range slider so the user can change the slide and as you can
see our filter reacted and it's showing now the top 20 or the users could use those arrows in order to change the step
and as you can see as I'm moving to different values the filter size as well is changing so that said this is how you
can use parameters in filters as you can see your view is very Dynamic and you let the users to customize what they
want all right guys so now we're going to move to the most important use case in parameters you going to see this use
case almost in each table project so the use case is to use parameters to switch between dimensions and to switch between
measures so now let's learn first how to use parameters to switch between dimensions in one view so let's say that
you are building a dashboard about the sales and you're going to have views like sales by country sales by category
so that means you are creating two views with the same metric but different dimensions so now instead of having two
views we can to have only one View for the users and they going to decide which dimension they going to use in the view
and now in order to do that we have to use the power of parameters all right so now let's go and create our view we have
the sales so let's take the sales on the columns and then we need the countries we're going to take it from the
customers and then we have here the country and the rows great and as usual we're going to show the labels so now we
want to make the dimension country as a variable as part meter so that means we need somehow to switch between
Dimensions between country and category in the same view so that means instead of having the dimension country we want
to have like a dynamic Dimension with different values so now the first thing that we have to do is to create a
parameter where the users is going to choose which dimension should be presented at the view so here we're
going to go and create a parameter from the data pane so click over here then create parameter so here the main focus
of this parameter is to choose which dimension going to be presented at the view so first let's give it a name we're
going to call it choose Dimension and now the question is what are the values inside this parameter it's going to be
the dimension name so it's going to be values like country and category so they are string so the data type over here
going to be string let's go and select that and as you can see Tableau did disable the format we cannot choose a
format for the string it's like free text next we have to define the current value and here we're going to have the
dimension country as a default so let's go and enter the value of country all right so now since the data type is a
string we cannot build a range from it so here we have only two options either we're going to have it as a free text as
an input field and in this scenario it really makes sense to have a predefined list for the users since the users will
not see your data source and they have no idea which Dimensions do we have so for that if we go with the free text
it's going to be really confusing and no one going to get the right dimension for it so in this scenario we really must
provide a predefined list for the users and then they're going to select the value that it going to sue them so here
in this example we're going to offer only two Dimensions it's the country and the category so let's go and add those
values so we're going to have the country and the next value going to be the category and of course you can add
more Dimensions like the city the product name and so on so now we're going to stick with the example and
that's it so let's click okay great so now if you check the data pane we have a new parameter called choose Dimension
and here you can see quickly which data type do we have for each parameter so now the next step is to show the
parameter for the end users so right click on it let's go and show parameter all right so now let's check our
parameter on the right side we have a list it makes sense we have created a list parameter and at the end we're
going to have a list for the users and inside it we have only two values country and category so now if you go
and switch between those two values nothing going to change in the view because this parameter is not yet
connected to our view all right so now we're going to go and create our Dynamic Dimension and use it in the view instead
of the country so that means we have to create a new field in order to do that right click over here and create
calculated field so let's go there now let's call it Dynamic Dimension we're going to use here the case when don't
worry about it I'm going to explain everything in the section of calculations the syntax start with case
and then we have to specify the field name and in this situation we're going to enter the parameter so our parameter
called choose and here as you can see as you are writing Tableau is suggesting stuff for us so our field called choose
Dimension so next we're going to go and specify an action for each scenario for each value so let's have a new line and
write whenn the first value going to be the country you need to be really careful here to write it exactly as we
wrote it in the parameter so it was capitalized in the parameter and it should be as well here capitalized
otherwise it will not work so now what can happen if the value is country then we have to specify the action so if the
users choose country what going to happen the dimension country should be used so let's go and write over here
country and as you can see as I'm writing W is suggesting so we need the dimension country you can see it from
the Icon over here so let's select that all right so now let's move to the next scenario is that the user going to go
and select the value of category so it's exactly the same stuff we're going to write here when the value is category
then what going to happen the dimension category should be used so let's start tying here category and as you can see
we have suggested over here the dimension category let's select it so that say this is the scenarios that
could happen to the parameter and we have to end the case when like this so as you can see in this calculation we
are just mapping between the values of the parameters and the dimensions so let's go and click okay now as you can
see we have a new dimension on the left side called the dynamic Dimension it is calculated field and now we're going to
go and remove our static dimension the country and instead of that we're going to add our new Dynamic Dimension all
right so now let's go and check whether it going to work as you can see the value is now category and in the view we
see the categories which is really good all right so now let's change the value of the parameter to country as you can
see the dimension in the view did change so now we have country instead of category so as you can see parameters
are really powerful and you are going full Dynamic on your view where the user is going to define the level of details
in the view by changing the dimension so imagine now you are making a dashboard with sales and you have 10 dimensions
here you are going with only one view instead of having 10 reports all right so that's it for this use case this is
how you switch between Dimensions using parameters all right so now you have the following Tableau task the task says to
create a dynamic measure using parameters to swap between three measures sales profits and quantity in
the same view you can pause the video right now to do the task then resume once you are done all right so now let
me show you how you can do that we have exactly the same steps as the dimensions we have first to create the parameter
and second to create the logic in the calculated field let's start with the first one to create the parameters we're
going to go to the data pane click over here and create parameter we're going to call it choose measure and here you have
to think about the values of the parameters so it's going to be the name of the measures which means the data
type going to be a string and here we have to define the default value so here we have three values sales profit and
quantity and we're going to have the default value as sales and here again about the values the users don't know
about your data source so they don't know the ex exact name of your measures so you have to go and create a
predefined list for them so let's go over here we have three values so we're going to have the first one sales the
second one profit and the third one going to be the quantity so that's it let's go and hit okay so as you can see
on the left side we have our new parameter and the next step is to show the parameters for the end users so in
order to do that right click on it and show parameter so let's check our parameter over here you can see it
starts with the Sal since it's our default and you can switch between those values but as you can see nothing is
changing at The View so the view is still showing the sales so the next step is now to go and create the calculated
fields in order to do that we're going to go to the data pane right click over here and then select create calculated
field we're going to call it Dynamic measure and here again we're going to use the same syntax so case then the
name of the parameter so choose we're going to select the measure and now we're going to go and Define the
scenarios so when the value is sales then the action going to be selecting the measure sales so write
sales and select the measure all right so new line and we're going to go now and map the next value so it's going to
be the profit then the measure profit so profit and let's go and select the measure all
right so we M that we're going to map now the last value so we have the quantity and if the user select this
value in the parameter the quantity measure going to be selected as well so let's go with that so that's it this is
our three scenarios we're going to have end at the end so now as you can see our calculation is valid and let's go and
hit okay and now if you check the data ban we have new calculated field called Dynamic measure so now what we're going
to do we're going to go and remove our static measure and replace it with the dynamic measure all right so now let's
go and change the values in the parameters so let's start with the sales as you can see now we have the values of
sales and if we switch it to profits you can see the axis and the values in the view are changing to the new measure but
now let's go to the last one to the quantity and as you can see we don't have any data well if you have something
like this then we have an issue either in the calculations or in the parameter so let's find out where is the error
let's go to the calculation again right click on it and then go to edit and here we have to compare the values as you can
see we have here quantity and we have the dimension quantity everything is like correct but as you can see the
value over here in the parameter is quany so here I have a tao and that means for Tableau we didn't Define any
scenario for this value in order to correct that we're going to go to the parameter on the left side right click
on it then go to edit and then we're going to go to our list and change this value so double click on it and write it
correctly quantity so that's it let's go okay and now as you can see we have data for the quantity so it's really
important to have exactly the same values from the parameters inside the calculation so as you can see it's
really sensitive so with that we have a dynamic Dimension and a dynamic measure and we can switch between those stuff as
the user wants all right so this is how you can use parameters to swap between measures in a view it is just
great all right so now we can move quickly to the use case where we can create Dynamic titles using parameters
now if you look to our previous example we have an issue you see we have the title sales by country but the view is
showing category by profits because we chose over here category by profits and now the title is wrong and misleading so
how we can solve this problem we can use parameters to switch this static title to a dynamic title let's see how we can
do that so let's go to the title and double click on it and now we have a new window to customize the title and now
the rule as a default it's going to be the sheet name so that means the name that you gives to the worksheet going to
be the title of your view so in this example I call this worksheet as sales by country and we have it as well as a
title but now we have to change this rule to be measured by Dimension let me show you how to do that so let's just
remove this Rule and the first word in our naming convention going to be the measure and now in order to insert the
parameter we're going to go over here on the insert then you will have a list of different Tableau functions and we have
here a section for all parameters so here we need the parameter for the measures so let's click on that and now
the next word our naming convention going to be by so Space by space so now as you can see by don't have any
background color because it is static and the parameter has a gray color to indicate that this is a dynamic value
and then the last word of our title going to be the parameter Dimension so let's go and insert that in the same way
click on insert and our parameter going to be over here parameter Choice Dimension let's click on that so the
first word going to show the value of the parameter measure then we have bu then we have the value from the
parameter Dimension let's go and click okay and now as you can see the title of our view did really change so now we
have it correct profit by category and now as usual we're going to go and play with the values of the parameters so now
let's have the dimension country and you see now we have profit by country and the same for the measure we can go and
select quantity so we have quantity by country so as you can see it's really amazing and you can add parameters in
everything and you're going to have really awesome views in Tableau let's have quickly another example we can do
the same in the parameters and filters and here we can make as well a dynamic title so let's double click on the title
let's remove these parts we're going to call it top and then the value going to be from the parameter so it's going to
be top 30 top 40 and so on so we're going to go and insert the parameter that you are using in the filter so it's
going to be the choose top end products and then we can add the word products so that's it let's click okay and now as
you can see we have the title top 30 products because the value in the parameter is 30 and as you are changing
the values in the parameters you can see the title is as well changing accordingly I just love barits in
Tableau all right so now we're going to move to the last use case we can use parameters in pens in the last tutorial
we created pens and histogram about the scores of the customers and we have decided that the size of the bin is 10
so let's go and rebuild this view quickly it's really easy so let's take the scores and put it in the columns and
then we're going to take the count of the customers and put it on the rows so with us we have an histogram and the
size of each of those pens are 10 so again we have a constant value inside our view let's go and make it Dynamic so
we're going to go to our pin score right click on it and then edit so here you can see the size of pens is 10 this is
what we have defined but now instead of that we're going to create a parameter so right click on it and again we have
here the option of creating a new parameter so select that now we're going to call it choose size of pens and now
here again tblo did the side on the data type it should be based on the scores and here we have the default value is 10
I'm fine with that and now we have to go and choose which values can be allowed either all the values or list or range
and here I recommend to use the range because if you look to the perimeter of range it really look like small pins and
as well it makes sense to define the range for the users so here we have the minimum five the maximum 25 and the step
size going to be five I'm fine with that I'm going to leave it as it is so let's go and click okay and now you can see
instead of having the size of pens 10 we have a parameter let's go and hit okay so as you can see nothing changed in our
histogram because previously we have the size of 10 and the default value in the parameter is as well 10 so let's go and
test everything we have first to show the parameter so right click on it and show parameter so now in the right side
we have 10 and if we are just moving between those two values you can see that our histogram is as well changing
accordingly and with that the customers can go and customize the histogram as they want and here always don't forget
to make a dynamic title because it's really cool so let's go and do that double click on it so as usual we're
going to remove this from here and we're going to call it histogram so this is the static part histogram score and now
we're going to add the size of pens so we're going to have insert size of pens and then we're going to close it so
that's it with that we have a dynamic name and now you can see the selected value from the parameter is now showing
in the title so if the user is changing the size of pens as you can see the title is as well changing accordingly
this really makes a lot of fun working with Tableau all right so now let's summarize
I think parameters are the best feature that we have in tableau and parameters are like variables that allows the users
to replace the constant value in the calculations filters reference line and so on and another unique thing about the
parameters of that they are independent from your data set from your data source and the main purposes of parameters is
to make your visualizations more interactive more flexible and dynamic and give different users the possibility
to customize the visualizations for different ways and requirements without having to create multiple versions of
the same visualiz I just love parameters all right guys so with that we have learned everything
about the parameters and how to make our views Dynamic and in the next section we will learn more techniques about
interactivity in Tableau and we're going to focus on Tableau actions Tableau actions they are really
great feature in Tableau where it can adds more interactivity and dynamic to your dashboards which going to make your
dashboards very modern and interactive and as well it's going to enable the users to do that Explorations using your
dashboards so as usual first we have to understand the concept behind the Tableau actions then we're going to go
and practice in Tableau so let's go all right guys now we're going to start with the first question what is
action well action is a change of status that means because of specific event or trigger the status of an object can
change from A to B and the object in Tableau going to be the visualizations the starting point we call it in Tableau
is Source sheets and the action going to be triggered by by the user interactivity how usually the users
interacts with our views using the mouse so either by hovering the mouse on the data or by selecting or clicking on the
data and the last option is using the menu so so far we have defined for Tableau the starting point the source
sheet the second thing we defined for Tableau what can to trigger the action and the last thing that you have to
Define for Tableau is what can happen once the action is triggered and here we have six different options or actions
the first one going to be go to URL that means Tableau going to jump from tableau to an external website so that means the
target going to be here a website not Tableau or not any visualizations the second option is to jump or to go to
another worksheets or to another dashboards so here we are moving from one worksheet to another moving on to
the third one we have the filter action what this means the actions that you are doing at the source sheets is going to
affect the filtering in the Target sheets so anything that you are clicking on the source sheets it's going to
impact the filter in the Target sheet and then we have another action called the Highlight so here again we have a
Target sheet and this time any action that you're are doing on the source sheet it's going to impact and going to
be highlighted in the Target sheet without filtering the data so that means go to sheet filter and highlights you
have always to specify the source sheet and the target sheet and then we have two other actions where it's going to
impact the values of something so here we have change set value so anything that you are doing on the source sheets
is going to affect the members or the values of the target sets so this going to make the set very Dynamic and
interactive the last one we have change parameter values so again here any interaction that you're doing in the
source sheet it going to impact the values of the parameters so with that we have now all the options that you can
Define as a consequence for the action so as you can see it's really easy we have to define the source sheets we have
to define the trigger and then we can Define what can to happen once the action is
[Music] triggered all right guys so in we can create actions either in the worksheet
page or in the dashboard page in order to do that we're going to go to the main menu over here we can find the option
worksheets so let's go there and then we have here the option of actions in order to create new actions or we can go to
the dashboards and as well we have the same option actions here but since we are now at the worksheet page it is
grade out so now we're going to learn how to create actions in the worksheet page and we're going to start with a go
to URL so let's go back to the worksheet in the main menu then let's go and click on the actions with that we're going to
get the first window so what we're going to see at the start is is an empty table because we didn't create any actions yet
but once you start creating actions you will get a list of all actions that you have inside the workbook or inside the
sheet so now in order to create a new action we're going to go over here add an action then we're going to go to go
to URL so let's select dots and here we're going to get a new window in order to set up our action in our example we
want to jump from Tableau to external web page to Wikipedia so we have to give it first a name the name of the action
it's going to be go to more details then as we learned we have to specify for Tableau three things first we have to
Define for Tableau The Source sheets the starting point of our action then we're going to specify for Tableau what going
to trigger our action and then at the end we have to specify the target so let's start with the first one we have
to specify which worksheets going to be including this action so here we have to select first which data source it's
going to be the big data source and St going to select immediately the current worksheet so sales inside source so
that's all for the source sheets then we have to specify for Tableau what can to trigger our action and here we have
three options either Mouse over select or by menu let's leave it as a menu first then we have to Define for Tableau
what is the URL Target in our example we have to specify here for example the Wikipedia page and here we have two
options either we going to create a new tab or we're can to create a new window so that's all it's really easy all what
you have to do is to specify the starting point what going to trigger our action and what can happen once the
action is triggered so let's go and hit okay and with that you can see we have now one action in this table let's go
and hit okay again and let's test it so so far nothing changed in our visualizations as you can see we have
the subcategories by the sales but now once the users clicks on the marks so for example let's go on this chairs over
here we will see here a new link it says go to more details and this is exactly the actions that you have defined so
here the interaction from the users they have to go to the marks they have to click on the mark and then go to the
menu so once click on the link over here T going to jump to a Wikipedia page so that's it this is how it works now let's
go and try different triggers so I'm just going to close this let's go back to the worksheet and then go to the
actions let's go to our action over here and go edit it and now instead of using menu I would like to have select so
let's see the effect of that let's click okay and then again okay now the trigger for the action going to be by selecting
by clicking on the marks so once I click somewhere over here let's go to the storage I'm going to go and click on the
Mark we're going to go and jump to Wikipedia so as you can see here it's a little bit more sensitive once you click
on the marks you're going to jump to the URL so here we don't have a menu where we have a link we're going to jump
immediately to the link let's go and try the hover it's going to be more extreme so let's go to the actions again to our
action and then let's go to the hover and here you have to be careful as you are Mouse hovering because you're going
creating a lot of web pages so let's go and hit okay now very carefully once I Mouse hover on the paper tblo going to
go and jump to Wikipedia I didn't click anything I just Mouse hover so as you can see now the action is very sensitive
to the user's interactions by just Mouse hovering on the marks TBL going to go and execute the action ction so with the
menu the users have the chance to think whether they want to execute the action or go to the URL or not with the select
it's more aggressive where the users going to select on the marks they can jump immediately to something else with
the hover it's very aggressive just by Mouse hovering on the marks the action can to be triggered so now let's go
close this and be very careful where you are Mouse hovering because once you hit any marks table going to go and open a
new web page so let's go back to our worksheets and then go to the actions let's remove it because it really
doesn't make sense to have a mouse hover to go to any URLs the best way is to do that is to go to the menu all right so
now since we are working with URLs we can add a lot of stuff like values filters parameters to the URL in order
to make something more Dynamic for examples I would like the users depends on which subcategory they select they
going to go and find more descriptions about this subcategory so how we can do that first we're going to go to the URL
over here and we're going to add Wiki then we have to add the value of the subcategory in order to do that let's go
to the insert over here then we will get a list of all fields that we have inside our data source so we are searching for
the subcategory and we can find it over here so let's go and select on the subcategory so as you can see it's like
Dynamic inside our URL and now I would like to make the name of the link as well more Dynamic so let's go and call
it read more about and then we have to add the subcategory to make it more Dynamic so we have as well here an
insert and we're going to go and search for the subcategory we have it over here so that's it with that we have a dynamic
name for the link and as well a dynamic link let's go and hit okay and try that and again okay so let's go for examples
to the tables over here click on the mark and you can see here we have the following link it says read more about
tables so it read the value from the subcategory that we are currently selecting so let's click on that and
here we're going to jump immediately to the Wikipedia page that describes the tables let's go and try something else
let's go to the storage over here as you can see the name of the link is very Dynamic we have read more about storage
and once you click over here you will get more informations about the storage so this is really amazing in order to
add more context more informations inside of our visualizations and to make it more interactive so that's all now
for the go to URL action all right guys next we're going to learn how to use actions in order to
jump from one worksheet to another one in this example we have the source or the starting point the sales insights
and the target going to be the profit insights so now we'd like to make an action in order to jump from the sales
to profits in order to do that we're going to go to the worksheets in the main menu then we're going to go to the
actions and we're going to go and create a new action this time we're going to go and select go to sheets so let's go and
select that and here we got our new window in order to set up the action it is very similar to the URL setup so
first we have to give it a name we're going to call it go to profit insights and then here we have the three things
the source what's going to trigger the action and the Target The Source going to be the sales insight and the action
this time going to be as well BYU let's go and select that and then we have to specify I the target sheet it going to
be the profit inside so let's go and select that so we have our setup let's go and hit okay that's all then as you
can see we got a new action in our table let's go and hit okay as well so now let's go and test it let's go to one of
those marks let's go to the machines and then we get our menu so we have now two links the first one says go to the
profit insights or read more about the machines so this one going to take us away from Tableau to an external web
page the first one going to move us to another worksheet inside tableau so let's click on go to profit inserts now
as you can see table executed the action once we clicked on that and we jumped to another worksheets now we are at the
profit insights all right so that's it as you can see it's really easy we have to just specify the source sheets the
target sheets and what can I trigger the action all right guys moving on to another type of actions we have the
filter action so what going to happen here that anything that you are selecting in the source sheets is going
to be relevant in the Target sheets that means in the Target sheets we will see only the data only the informations that
you have selected in the source sheets so let's see how this works we're going to stay with the same examples where we
have one worksheet about the sales it's going to be our source and we have another worksheets about the profits
it's going to be our Target so let's start with the source let's go to the menu worksheets let's go to the actions
and let's go and add a new action the first one going to be the filter so let's go to the filter here we get again
a new window in order to set up our filter action it can be very similar to the previous ones but here we have
little little bit more options so first we have to give it a name we're going to call it filter profit insight and here
as usual we have to define the source sheet it going to be the sales insights I don't want to have all sheets and then
the trigger is going to be let's say that it's going to be the select this time and then we have to define the
target sheet it's going to be our profit Insight over here the filter so here in the filter axis we have more options
about the interactivities we have to Define for Tableau what can happen once the users deselect the data once they
clear the selections so here we have three options keep filtered values show all values exclude all values the best
way in order to understand this interactivity is to have an example so now we're going to stay with the default
keep filtered values let's go and hit okay with that we got our new action over here let's hit okay again and try
the action the best way in order to understand how this filter action works is to bring both of the worksheets in
dashboards so let's go and create a new dashboards and let's go get the source and get the target as well below it I
will just remove this Legend over here so now let's go and start interacting with the report so again here once we
select something from the source it's going to affect the data on the targets so for example let's go and select for
example those subcategories so as you can see my interaction with the source can to have an effect on the Target now
we can see only the subcategories that I have selected in the source sheets so with that the user is going to get the
feeling that everything is connected together everything is interacting together is alive anything I'm selecting
in this worksheet it has an effect in the next one and here for this type of action we mostly go with the select
instead of the menu it really makes sense to select something in this dashboards and to have immediate
interactions in the next one so as you can see it's really easy right so now I want you to understand another type of
interactivity what can happen once I deselect what I have selected or once I clear my selections so we have selected
show filtered values so once I for example here click on the empty over here to deselect nothing going to change
so with that we have kept the filtered values and this is exactly what we have specified inside action but now if you
say you know what once I deselect stuff in the source I would like to have all the values as well deselected from the
Target in order to do that we're going to go back to our action and we're going to go and edit our filter action so now
if the users go and clear their selections or deselect we want to show all the values for the Target sheets so
let's switch it like this click okay again okay and let's try this so for example I'm going to go and select only
the storage and as you can see we got only the storage and once I clear my selections once I deselect anything in
the source you can see we'll get all the values again in the Target sheet in this scenario it makes more sense to use
these options if I'm not selecting anything from a source nothing should be filtered in the targets so now let's go
and check the last option let's go to the worksheets actions and to the filters let's go and exclude all values
let's select that and let's try what can happen now so now at the start nothing happened we see all the data from both
sheets so now let's go and select for example those subcategories as usual we will get all data filtered in the Target
sheets but now once I deselect everything going to disappear from the target sheets so that means the target
sheet will only show the data if I select something in the source sheets so that means nothing here is relevant as
long as I'm not selecting anything in the source sheets and once I start selecting something in the sour sheets
the data going to be shown otherwise if I deselect it now don't show anything one more thing that I would like to show
about the filter actions if you go to the Target sheets over here you can see that we don't have any data and table
going to indicate that there is an action that is filtering the data inside these worksheets and you can see in the
name of the filter we have the word action table want to indicate that this filter is really depending on the
actions from the users so any value that is selected from the users it's going to impact this filter so for example if you
go inside it and edit the filter you can see nothing is selected and that's because in our interactions we didn't
select anything here in the dashboards and once for example I select those values you can go back to the Target
sheet and you can see those values as well selected in the worksheets and if you go inside the filter you can see
those values are as well selected inside the filter so anything that starts with the action in the filter this comes from
an action filter and the values inside it can to be defined depending on the interactions that you have done all
right so with that we have covered everything for the filter actions in Tableau all right guys now we would like
to show you how to create a quick actions in Tableau using the dashboards for example let's say that we have the
sales and the profits and they are disconnected there's no actions between them but now I can go and create a
filter actions between them very quickly if you go for example to the sales over here you can find a small icon for the
filters it says use as a filter so if you click on that you can see now it's filled and now if I'm clicking on
anything inside the sales as you can see the profits going to be filtered and now if you go to the main menu to the
dashboard to the actions you can see that tblo J create automatically new actions and it's usually have the name
of generated so we have here filter one generated this one is created automatically or quickly as we clicked
in this small icon over here on the dashboard and of course you can go over here and change the options if you don't
want to have select you can move it to menu to hover and so on and of course you can do the same thing for the profit
Insight so let's go and close everything let's go to the profit insight and we can say okay the profit going to filter
as well the sales so let's go click on that and now let's deselect everything and anything that I'm selecting in the
profit it's going to as well filter the sales so this is really nice and quick way in order to create actions in
Tableau but this is only for the type filter action all right guys now we're going to
talk about another type of actions we have the Highlight the Highlight is very similar to the filters where the users
going to interact with the source sheets and in the Target sheet we're going to focus on a subset of data that we
selected from The Source but the main difference here that the unrelevant data will not be filtered out the all the
data going to be exist in the Target sheets but only what you are selecting going to be highlighted in the Target
sheets and the best way in order to understand the Highlight action is to have a dashboard with two worksheets so
now let's go and create a highlight action as usual we're going to go to the main menu over here but this time we're
going to go to the dashboards then let's go to the actions and let's add a new action so we're going to go over here
add an action and then we're going to pick this time the Highlight as usual we have to define the source the trigger
and the target sheets so let's go and give it a name it's going to be highlight profit insight and then the
s's going to be our sales so I'm just going to remove the profit from here and the best way to work or to trigger a
highlight is to have a hover so I'm just going to run this action on the hover and then the target going to be our
profit inside so I'm just going to remove the sales insid and then here we have some options to Define which Fields
going to be included in the interaction as a default it's going to be all the fields or dates and time then the last
option you have selected Fields so you can specify which field going to be included in the action I'm going to stay
with the default all Fields so with that we have everything let's go and hit okay and with that we got as well our action
let's hit okay again so now let's go and test the action let's go to the source sheet the trigger going to be mouseover
so now as I'm Mouse hovering on those informations you can see that tblo is reacting in the Target sheets and
focusing on the data that I'm like Mouse hovering so if I stay on the storage here with my mouse you can see that
stabo is focusing on the storage in the Target sheet and you have like a highlighter with a yellow color so as
you can see it's really nice right it add like more interactivity more Dynam Dynamic to your views as the users are
interacting with the worksheets and other worksheet is getting highlighted so it's really nice and now you might
say you know what I would like to have the same effect in the profit insights so as a mouse hovering on those data I
would like to have highlights in the source in the sales insights so both of those reports or those worksheets can
highlight each others in order to do that it's really simple let's go to the main menu again the dashboards actions
and let's go to the Highlight action and then let's include everything in the source sheets and as as well everything
in the Target sheets with that all those worksheets can highlight each others so let's go and hit okay and then again
okay and let's check so now as you can see as I'm Mouse hovering on the profit insights the Highlight is going to be in
the sales and the vice versa as I'm moving on the sales you can see the highlights going to be on the profits so
now the mouse hover going to highlight both of the worksheets all right guys so now generally speaking about the
highlights in Tableau there are different options where we can add highlights or control the Highlight
option for example if you go to the quick menu over here you can see that we have an option to edit the highlights so
if you go over here you can see that we can disable the highlights we can enable it we can Define which Fields going to
be included in the highlights so for example if I go over here and say okay disable workbook highlights what can
happen is that the Highlight action going to be disabled in order to enable it we're going to go again to the quick
action over here and enable the workbook highlight so as you can see now I can highlight on those stuffs and in Tableau
we can add highlights to the worksheets or to the dashboards if you go to the main menu to the analyzes and then here
we have highlighters if you go over here we have the subcategory since it is the only Dimension that we have in this
dashboard or those worksheets so let's go and click on that now if you check the right side we got something like a
filter but it's not really a filter it is a highlighter so if you click on this box over here you will get a list of all
these things values inside the subcategory so now what you can do you can just Mouse hover on those formations
and as you can see the dashboard is going to be highlighted so this is another way to trigger the highlights
inside your dashboards or worksheets by adding the highlighter on the right side so for example if I just go and click on
that it going to stay highlighted whole time since we have selected this value over here and of course if you want to
get everything back to the normal you can go over here click on the X and remove the value with that we got
everything back without highlights all right guys so that's all about highlights actions in
Tableau all right guys moving on to another type of actions we have the sets as we learned before previously in the
sets it can to split your data into two groups the ingroup and the out group so now the one who is creating the
dashboard or the worksheets going to Define which memb is going to be in and which memb is going to be out but in
order to make your visuals more interactive we can give these options to the users so they can Define which
members going to be in and which members going to be out and in order to do that we're going to go and create action sets
so first let's create a view and a sets in order to do that we're going to stay with the big data source let's take the
sales to the columns The Profit to the rows and here in the middle we're going to go and get the customer ID so with
that we got like data points but we still don't have any sets but first let's go and make those points a little
bit bigger in order to understand the members and then I'm just going to go and change the shape as well to be
filled circles so now that's it let's go now and create a set in order to do that I'm just going to go and select those
top right customers and then we go over here and then we say create sets all right I'm just going to leave it as it
is and with that we got on the data Bane in New Dimensions for the sets so now we're going to go and add it to our view
as a colors so let's go and move it to the colors over here so as you can see the blue going to be the in and the out
going to be gray out I'm just going to change those coloring so let's go to the colors and the in going to be let's say
the green and the outs going to be the Reds let's go and hit apply and okay and now as you can see the one who's
creating this view is deciding which members are in and which members are out but now let's go and give these options
to the users in order to do that we going to go and create create an action sets as usual we're going to go to the
main menu to the worksheets let's go to actions and let's add a new action this time we're going to use change set
values let's go inside and here we have the usual stuff we have the source what can I trigger the action and the target
let's just give it a name so change customer ID set and then we're going to go and Define The Source sheet it's
going to be the action set that we have it and then we have to define the action I'm just going to leave it as select the
target going to be the target set so in order to do that we have to click over here and then we will get here all the
sets that we have inside our data source in this example we have only one set inside the big data source so we have it
over here customer ID sets so let's go and click on that now here we have more options about the sets the left one
going to be what can happen to the set once the user start interacting or selecting data points and on the right
side here we have options about what can happen once the users clear the selection once the user deselect stuff
in the visualizations so now in order to understand those options we have to play around with those values so on the right
side I'm just going to say keep set values so if I dis select anything in the view nothing going to happen and now
in this left group we have assign values to set add values to set and remove values to set we're going to start with
the first one so once the action is triggered we're going to assign values to sets what this means if you choose
this one what table going to do going to empty the in group and anything that you are selecting going to be the members of
the in group so let's see what this means let's go and hit okay and then again okay again here we have to select
in order to Trigg here the action as you can see we have those members are inside the group so now let's say that I would
like to select those four members over here so once I start selecting those members what can happen only those
members going to be in the end group so as you can see those points are now out so that means Tableau is removing
everything and starting from scratch and anything that you are selecting going to be the only members of the end group so
that's it for this option the selection going to define the members of the in group let's go and change it to the
second option so let's go to our action the change customer ID so now let's move to this one it says add values to sets
so what can happen at this time tblo will not forget previously which members were inside the in group now we are just
adding new members to the sets so let's see how this works let's go and hit okay and again okay so now currently we have
those four members in the group and let's say that I would like to add two new members so let's say that I would
like to add those to members over here so let's go and select them so with that you can see we still have those members
in We just have added two new members so that it it's really simple right let's go and try the last one let's go to the
action and as well to the customer change ID this one we going to say remove values from sets so now what's
can to happen it's going to be exactly like adding new members to the sets but this time anything that you are
selecting it's going to remove those members from the sets so let's go and try that out let's go and hit okay and
again okay let's say that I would like to remove this member from the in group and move it to the out group in order to
do that let's go just select it and click on it so as you can see now it's red and it is not anymore in the in
group so that's it so this is about what can happen once we trigger the action but now let's learn about what can
happen once we start deselecting the action so let's go to the actions over here and go back to our set action so on
the right side we have here three options keep set values add all values to set remove all values to sets and so
far we have always worked with the keep set values so that means if you clear the selections nothing going to happen
the members that you have defined with your selections going to stay in the group but the other two it's going to
like destroy your definitions so let's say that add all values to sets so if you deselect it's going to adds all
values to the in group so this option means if you deselect everything going to be in and exactly the opposite we
have remove all values from set so if you deselect everything going to be out so let's go and select this one add all
values to set and try this out so now currently we have those five members in the group and the rate is out and I'm
like interacting with our reports and I select this point to be removed from the out group so now once I deselect or
clear my selection what's going to happen all the members going to be in the group and the other option going to
be exactly the opposite if I deselect everything going to be red and going to be out all right guys so that's all for
the set actions as you can see it's really nice feature where you're going to give the users the freedom to choose
which members is going to be in which members going to be out in order for them to do Focus analyzes instead of us
the one that is creating the dashboards so it really adds more Dynamic and more interactive to your
[Music] views all right guys now we're going to move to the last type of actions we have
the parameters again here we can use actions in order to change the values of the parameters so now let's have an
example in order to understand how this works let's build now sales by months so let's go and get the sales over here and
let's go and get the order date to the columns I'm just going to change it to the months over here and let's go and
add add the labels so now what I would like to build in this view as I'm like selecting data from The View I would
like to get the total sales of my selection so whether I choose one point or I choose different group of points I
would like to get the total sales of my selection so now in order to do that we're going to go and create another
worksheet where we want to show the total sales of our selection so let's go and create another worksheet so the
first thing that you have to do is to go and create a new parameter let's go to the data pain to the empty space over
here right to click on it and then create parameter let's give it a name it's going to be the total sales so
inside this parameter we're going to have the total sales of our selection so we're going to have the data type flots
the display formats let's move it to a currency standard and the current value going to be let's say zero instead of
one so that's all let's go and hit okay right click on it show parameter currently it's zero and nothing in our
view so now I would like to have one sentence here it says total sales and then we're going to have the value of
the parameter in order to do that we have to go and create a new calculated field so let's go over here in this
Arrow create a new calculated field so in order to do that we're just going to go to our parameter from the data pane
drag and drop it to our calculations so why we are doing this because we cannot use directly the parameter in our
aggregations or in our view so we always have to create a new calculated field and inside it we're going to have the
value from the parameter so that's all let's go and hit okay so now in the left side we have new calculated field our
new measure let's go and put it inside the text over here and as a default we're going to have it as a sum so as
the user are selecting different points we going to have the sum of all our selections so this aggregation is
correct but now here in the view we have only zero but I would like to have a sentence total sales then the value so
in order to do that let's go to the text over here then to the three parts and now we have a new window where we're
going to customize the text so we're going to say total sales and then we have the value of our new calculated
field but let's just make everything bigger so total sales let's move it to 20 and the parameter or the calculated
Fields it's going to be as well 20 and I would like to make it more bold so that's all click okay and as you can see
now we have total sales and the value is zero which comes from the parameter so now let's go and change this value to
for example 100 now as you can see we got the total sales of 100 and now I would like as well to change the format
of the total sales so let's go to our calculated field right click on it then let's go to formats and then here on the
left side we have numbers so if you click on this options we can go to the currency standard
and then let's move to United States so it's going to be somewhere over here so English United States and with that we
got the dollar signs all right guys so now the next step is that I would like to bring everything in One dashboard so
both of the worksheets let's go and create a new dashboard let's get the total sales and then we're going to get
the sales by month so let me just make it a little bit bigger and let's remove the title from the total sales so now as
you can see the total sales value comes from the parameter so now so far everything is disconnected between those
two worksheets anything that I'm selecting here it will not be reflected inside the parameter so now here comes
the magic I would like to change the value of the parameters depending on my actions or my interactions from this
view so in order to do that as usual we're going to go to the main menu over here to the dashboards then let's go to
the actions and then let's add a new action and choose this option change parameter values let's go inside it so
here we have the usual stuff the source the trigger and the targets let's give it the name change parameter total sales
so let's define the source it's going to be the sales by months so let's just remove the sheet seven from here the
sheet seven is the total sales and then the action going to be the select so I would like to select and Trigger the
action and then here we have to find our parameter so we have only one so the total sales let's select that so on the
right sides what's going to happen once we clear our selections so I would like to say okay let's set it to zero if the
users are not selecting anything all right so now with the last one we have to Define for Tableau which field going
to control the values of the parameters by the sales by month we have different informations as you can see over here we
have the month and we have the sum of sales of course the sum of sales going to be controlling the values of the
parameters so let's go and select this value over here and the aggregation going to be the sum since we are finding
the total sales so that's it all for now let's go and hit okay then again okay and now as you can see we have the 100
value comes from the parameters but if I select for example this data point over here you can see that the total sales
comes from my selection the 64,000 so now if I go and select all those values from the view tblo going to go and
summarize all those sales from my selections and put it in the parameter value so with this we have like
connection between the parameters and our actions to the view which gives a lot of dynamic and interactivities to
your dashboards all right guys so that's all for the parameter actions it's really nice feature in
Tableau all right guys now I would like to give you quick tips about when to use which type of triggers of actions so for
example if you want to jump from your worksheets to another worksheets or to go to an external website it's better to
give the options to the users to select this option using menu so first show the menu let the users see the link and then
if the users want to go there they're going to select the link and click on it it's always better than to surprise them
by select if they use it like select on something and like suddenly they go somewhere else it's really not nice so
go with me new if you go to URL or go to sheets and if you are using filter action the best way is to use select
it's like more interactive so once a user starts selecting from one worksheets the other worksheets going to
be filtered so I usually go with select if I'm using the filter actions and T used as well as a default if you are
using a quick action so for filter action I usually go with select and for the last one the highlights I really
recommend you to go with the hover so as the users are Mouse hovering inside one worksheets the other worksheet is as
well interacting it's really nice and more like modern so really be careful about about when on how to trigger which
actions don't surprise your users by jumping somewhere else if they are using like go to URL and sheets be careful
talk with your users about it how they would like to see it and then maybe together make a decisions about the
interactivity and actions together with the users all right guys so that's all for me about actions in Tableau all
right so that's all for the tips about the action triggers and with that we have completed the section the taau
actions and in the next section we're going to cover a very important topic in Tableau the Tableau calculations we
going to learn there how to manipulate the data in Tableau and we're going to learn many Tableau
functions Tableau calculations we will cover now over 60 different functions in Tableau in order to manipulate your data
you will not only understand how to use all those Tableau functions also you will understand the concept behind them
using very simple sketches and examples in order for you to understand how those Tableau functions Works CU some of those
calculations are really complicated so we will start first by covering the basics about Tableau calculations and
then we're going to dive into the most used functions in the four category roow level calculations aggregate
calculations LOD expressions and the table calculations so let's start first by having an introduction to the basics
of Tableau calculations so now let's go all right everyone so now we're going to talk about the calculated fields in
Tableau and we're going to start with the first question why do we need calculated fields in the first place as
we learned before as we are building our visualizations we always go to the data paint to the data source and we grab
those fields that we see to the view so now let's imagine that you are in scenario where you need extra
informations informations that are not available in our data source or you would like to manipulate and transer
those informations to new informations to new fields or let's say that we are building a very complex logic in our
views for all those scenarios we can go and create new calculated fields in Tableau to be placed in a our data
source so calculated fields in Tableau are userdefined fields that are created using formulas or Expressions so they
are additional fields that you can create based on the original fields in the data
source all right everyone so now we're going to move to the next question how to create new calculated fields in
Tableau there are five methods on how to create calculated Fields four of them are globally that means once you create
the calculated Fields it's going to appear here on the data source on the data Bane to be reused in any other
worksheets or in any workbook that is connected to the data source and we have one local method in order to create one
calculated field only from one View and we call it quick calculations so now let's go and explore those five methods
so the first way to create a new calculated field we can go to the data pane on the left side right click on the
white space so right click over here and the first option is create calculated field so once we go over here we get new
window where we're going to write our expression so that's it this is the first way let's move to the next one I'm
just going to close this and if you go over here we have a small Arrow near the search if you click on it we will get
exactly the same list so as you can see the first option create calculated field the Third Way in order to do that if you
go to any of those fields inside our data source let's say that we go to the addresses right click on it and then
here we have the option of create and the first one called create calculated field so once you go there we're going
to get exactly the same window but this time we're going to get the field name prepared in the expression because here
we went specifically to the address and we create from there a new calculated field so let's close this and I'm going
to show you the first method in order to create calculated field we're going to go to the analyzes in the menu over here
click on that and here we have the option of create calculated field so once we click on that we're going to get
again the same window so those are quickly the four methods on how to create a new calculated field you will
get always the same result only if you go to the field and you go from there and create calculated field you will
find the field name inside the expression so now let's go and call it my first calculation and I'm just going
to give anything here inside the expression let's just type one so let's go and hit okay so now we can see on the
datab ban that tblo did create for us a new field so it is like a field like any other fields that we have on the data in
our data source it has as well a data type it is continuous measure because I enter there one so it's like a number so
you can treat it exactly like any other fields but here to understand which fields are calculated and which fields
are original you can see on the icon over here it has the equal sign so that means if you see the equal sign near the
data type icon in any field that means this field is a calculated field it is not original field that comes from the
data source someone went and created this calculated field and it is based on the original data so with that you can
quickly identify which fields are original data that comes from the source systems and which fields are calculated
Fields created from the users so with that we have created our first calculated field and it is a global
field that means if you go to any other worksheet let's go for example to new one we can find again our calculated
field so now let's move on to the next method where we're going to create a local calculated field relevant only for
one view so in order to do that we can to have Fair something on The View let's take for example the customer's first
name and put it on the RADS now in order to make quick calculated field locally for this view we going to go inside the
field inside the dimension and we can do that by double clicking once you do that you can see we are now allowed to write
something inside this field and we are writing now the calculated field let's say that okay we have now capitalized
letters of the first name and I would like to manipulate it and transform it to uppercase so I would like to see
everything as an uppercase in order to to do that we have the function in Tableau called aberer so now I'm writing
the function name and it's going to transform the first name so with that I have created calculated field inside the
first name so once you go outside like click somewhere outside or click enter so now we can see on the result that
this function did change the first name to uppercase so with that we have done a quick transformation quick calculations
inside the view and if you grab the first name again from the datab Bane you can see that nothing changed so we
didn't change anything on the data source we just Chang it quickly for this view so this is how you can create
quickly new calculated field in the view without affecting the data source and it's going to be locally only available
in this view so now let's say that this transformation here is interesting and I would like to reuse it somewhere else in
other views so now in order to make it available in our data source what we can do we can grab this field from the
visualizations and just put it on the data source so let's release so with this you can see that tblo added a new
field inside the customers and we know this is calculated field by checking the data type you can see we have the equal
sign so tblo offer us here to rename it I would like to leave it as it is and if you go inside it in order to edit the
calculation right click on it and edit the calculation and again we got the window where we can configure the
calculation all right guys so with that I have showed you all the methods on how to create new calculated fields in
tableau all right in the next step we're going to go and learn the basic options that
we have inside the calculated window so let's go to our calculated field my first calculation and first let's show
the value in the view so let's drag it to the text over here and as you can see we have the value number one so let's go
and edit the calculated field in order to get the window so right click on it and let's go to the edit so what do we
have over here first we have the name of the calculated field and we called it in this example my first scal but of course
you can go to the data pane or the data source and rename it directly from there or you can do it inside the calculated
window okay the next information we have the name of the data source where we are creating the calculated field in this
example we created the calculated field inside the small data source this is really important if you have multiple
data sources and you are creating a lot of calculated Fields it's really nice to know where I'm creating now this
calculated field so it's nice info now moving on to the most important section in this window this white area where you
can write your expression to Define the calculated field So currently we have one but we can go and use different
stuff we can use the field names parameters functions and so on for example we created last time the upper
function for the first name so with that I have to find what should be done inside this calculated field so this is
my expression and now don't worry about the syntaxes that I'm writing inside the Expressions because in the next
tutorials we're going to learn everything about the syntaxes about different functions in Tableau so don't
worry about it now next information that that we have is we have the info of the calculation is valid so here Tableau
gives us a quick informations whether the expression that I just wrot is valid or invalid So currently I wrote the
calculation in correct way that's why we have everything fine from Tau but now let's make something wrong and now we
will get a red message from Tableau saying the calculation contains errors and here we have small Arrow if you go
over here you will see the message it says Tableau is expecting here a closing parenthesis so here Tableau show us a
quick message to know what's wrong in our calculation so if I go and add the parenthesis you can see that the
calculation is valid so we have a quick info from Tableau moving on to the next information that we have in this one it
says one dependency and small Arrow so let's click on that and see what do we have over here it says changes to this
calculation might change the following sheets sheet number one so here Tableau gives us a warning anything that you are
changing in the expression inside this calculation it might has an effect on the sheet number one and that's because
we are using this calculated field in the view in the sheet number one so this is very important information especially
if you have different worksheets and you are using the same calculated field in different worksheets and this happens a
lot especially if you are like focusing on content of one View and you go and change the calculated field so here it's
like a reminder a warning from Tau tells you all right if you do this change you can affect the following worksheets so
here my recommendation for you is always to go and check the dependencies to make sure that the changes that you are
making currently to the calculated field it is still relevant for the other sheets all right so moving on we have
two simple buttons the apply and okay I don't have to talk about it I think then we have here a small arrow and this is
very important so let's go and click on that what do we have here in this extension is documentations or a catalog
of all the functions that we have in Tableau so for example let's go and search for the function upper that we
use in this example so search for upper and now we can see on the right side the documentation of this function so here
we have three informations from Tableau the first one is the syntax of the function so syntax says it start with
the upper key word then it accepts only fi and the data type should be a string the next information we have a short
description of the function so it says it's going to convert a text string to all uppercase letters the third
information we have an example of use so here it says okay if you have an upper for the value product everything in
lower case the output the result going to be a product in uppercase so here we have a nice short quick descriptions
about all functions that we have in Tableau and this is very useful especially while you are writing the
calculations because it doesn't make sense to memorize everything right I tend as well always to check whether I'm
using the correct syntax or even I'm using the correct like function so I always check the examples and say okay
this is the one that I need and one more thing that we can see in this window this drop down menu and here we have
different groups of functions in Tableau for example we have here the group of string functions if you go inside it you
will get get the list of all functions that's going to manipulate the string Fields so we have here at the end as you
can see the upper function that we use in our calculation all right guys so with that we have covered all the
options that you can see inside the window of calculated Fields all right guys so moving on we're
going to talk about the basic components of calculations in Tableau so that means what kind of informations we can add
inside the Expressions inside the calculations the first thing that we can add inside the calculation is the
comments comments are really useful for you and for the others to have some context or small descriptions why you
are doing the calculation so for example in order to add comments to this code we can go in the start and we have the
forward two slashes then we can write anything anything after the forward two slashes will not be executed in the
calculation so for example we can write here calculation to change first name to upper case so anything I'm writing over
over here will not be executed and as well will not be checked from Tableau I really recommend always to add comments
so for you if you visit this calculation later you understand why you write this expression all right moving on to the
second information that we can add inside the calculations that are the fields from the data source so those are
the orange colors so we have it over here the first name but let's just remove everything and starts from
scratch so if you want to add a new field inside this calculation field you can start writing the field name so as
I'm writing now Tableau going to make a list of suggestions so here tblo defined three things the first one is a function
as you can see there is like an small icon like an F this indicates that this is a function or the second information
it says the first name and beside it there is a data type icon this data type icon can indicate this is a filled name
the third information is as well the first name with the icon so that means it is filled but here Tableau writes it
this is from the big data source because those two Fields has the same name exactly so here table show for us that
this field comes from different data source the first one comes from the same data source that's why da don't have to
like say okay it is from small data source because it is from the current one but since the second one comes from
different data source tblo indicate that this is a different field from different data source so now since we want the
first name from the current data source we can go and select this one over here and with that we have inserted a field
inside our calculations and as you can see it got the orange color another way to add Fields inside our calculations
and that is by drag and drop so let's say that I would like to get as well the last name so I can go to the last name
over here drag and drop it inside the calculation and as you can see with that we got our second field and again it is
the orange color and of course the fields that we are add to calculations could be any Fields example let's go and
add the Sals the Sals is a measure so we go to the orders and we have the sales we can just drag and drop to the
calculations so as you can see Tableau accept as well measures inside the calculations and they're G to have as
well the same color the orange color all right moving on to the next and very important component we have the Tableau
functions Tableau functions are built-in operators that could be used in order to manipulate to transform to change the
content of one field so for example what we can do with the sales we can go and calculate the total sales inside our
data so in order to do that we can use the function sum so before the field sales we can start with the sum and then
we have the open the parenthesis and then close it so as we can see this component those functions in Tableau
have always the color of light blue so now what can happen T we're going to go and summarize all the values inside the
sales and present it as the result so let's go and hit okay we're going to get an error here because we have changed
the calculations so let's go and remove it and let's get it again in the text so that we got the total sum of sales
inside our data so now let's go back to our calculated field and see the next component we have the logical
Expressions we can use the logical expressions in order to check whether a condition is true or false and they have
as well the color of black so for example let's say that we want to create the calculation where we are checking
the sum of sales if it is higher than 1,000 then we want to see the value high at the end so let me show you how we can
do that we're going to use the F statement so it's going to start with the keyword F and as you can see it is
black because it is logical expression so if the sum of sales is higher than 1,000 so we can use here the operator
higher greater than 1,000 then what going to happen we're going to have the value high and then we're going to go
and end The Logical expression and we can check over here that the calculation is valid so here we have our logical
Expressions if then and end don't worry about the syntax we're going to learn everything in the next tutorials step by
step with very simple examples all right so now we're going to move to the last component that we can add to our
calculations we have the parameters parameters are like Dynamic fields that we can add to visualizations in order to
make everything dynamic in the views or in the calculations again there will be a dedicated tutorial for that later but
now let's see how we can add a parameter field inside the calculation so first we have to create quickly a parameter in
order to do that I'm just going to close our calculation over here and then we going to go to the arrow and the data
pane then we going to have the create parameter click on that here we're going to get the window in order to configure
the parameters we're going to call it choose a number so that's it let's close it and say okay and now on the left side
we got a new parameter right click on it and show parameter so with that we got like on the right side an input field
where you can add a value for example we have it now as a one we can add like 1,000 so now nothing going to happen in
the view because we don't have anything but we're going to go and add this parameter inside the calculation so
let's go back to our calculation my first calculation right click on it and then go and edit and now what we're
going to do instead of having 1,000 we're going to get the value from the parameter so we make like a dynamic
calculated field so the user is going to go and control this value so let's go and remove the 1,000s and we're going to
start writing the name of the parameter like any other field so it's going to be choose and we get it over here so click
on that and with that we have added our parameter inside the calculation and as you can see parameters in Tableau has
the color of purple so that's it for the last component and with that we have covered all different components that is
possible to be used inside calculations so now let's go and try the output I'm going to go and hit okay and then I'm
going to remove this one it's red so let's get the products to the rows so next we're going to go
and get our new calculated field this time it's going to be a dimension because the output of the calculated
field going to be a string value so let's check the results and as you can see over here we have two products with
the value High the RIS going to be null so now let's go and get the sales in order to understand why those values are
high and that's because of our calculation so anything above 1,000 we can get the value High anything below
it's going to be null and with the parameter the users are controlling the calculation so if I go over here and say
okay instead of 1,000s let's have 500 so with that we have included as well the other products so all the products now
has the high value in the calculated field so with that we have generated new informations to our
visualizations all right guys so now let's quickly summarize the components of the calculations in this example
first we can see the comment so this command is going to help us to document the purpose of the calculation and it
will not be executed it's going to be as as well in the gray color the next component we have the field so any field
inside our data source whether it is dimension or measure we can add it to our calculation like this one we have
the sales and they have the orange color the next component we have the functions they are the built-in operators in order
to manipulate our data and they have the blue color the next components we have the operators in this example we have
two operators the plus the arithmetic operator and as well the comparison operator it is the higher than and they
going to have the black color the next component it's going to be as well with a black color we have the lital
Expressions those are static values that we can insert inside our calculations it could be a number like here the 10 or it
could be string like here the high and here don't forget to add the double or single quotations marks in order for
Tableau to understand this is a value not field or a parameter or function or anything else and we can add as well
date values all right moving on to the next component we have the logical Expressions we have if then and they
going to help us in order to evaluate conditions inside Tableau and then to decide whether it's true or false and
the last component that you have inside the calculations we have the parameters they are the dynamic fields that we can
use inside calculations all right so that's all about the components of calculations all right so now we're
going to talk about the nested calculations in Tableau in Tableau you can Nest calculations by using the
result of one calculations as an input for another calculation and that's because sometimes you might be in
situation where we have have complicated calculations with different steps so for each step we're going to have one
calculation so as you are implementing those steps you're going to end up having multiple calculations and they're
going to be nested inside each others so now let me show you an example all right so now we're going to go and create a
new calculated field to manipulate the values of the field country to have specific format so in this example let's
take the first name of the customers and as well the countries now we're going to go and create a new field for the
country with different format so let's go and create a new calculated field and then we're going to start with the first
calculation where we're going to make all the letters of the field country with the uppercase so we're going to
have upper function and then we're going to manipulate the field country so we're going to start writing country and here
it is our field so that's it for the first calculation let's go and hit okay so with that table we going to go and
create a new calculated field new dimension inside our data source so let's go and check the values as you can
see all the letters all the countries are with the uppercase all right so now we're going to move to the next step in
the transformation where we want to show only the first three characters of each values inside this new calculated field
so in order to do that we're going to go back to our calculated fields and we're going to edit it and this time we're
going to use the function lift so you can go and search in the catalog to see the syntax of the lift function as you
can see it accept two Fields the first one is going to be the string that we want to manipulate and then we're going
to have the number of characters that we want to show so let me show you now step by step how we can do that let's go
first to a new line so we're going to have left and then it needs two arguments the field that you want to
manipulate and the number of characters the field that we want to manipulate is going to be the result of the upper
function so it's going to be this one over here so I'm going to just cut it and insert it over here so with that we
have the first argument the second argument is going to be the number of characters that you want to show it's
going to be three characters that's why we going to specify three so this is how we can list functions in Tableau the
first function to be executed going to be the one inside so the upper function going to be executed first and then the
result of this function going to be used as an input for the function outside for the function lift so that means first
we're going to go and make all the values inside the country as an uppercase then we're going to go and
execute the left function where we're going to show only the first three characters so now let's go and hit apply
to check the results with that you can see we have now only three characters inside the values of the country so
again the function inside going to be first executed then the function outside and with that you can further expand
this calculated field to more functions for example let's say the third step we want to go and calculate the length of
the characters and in order to do that we can use the Lin function so we're going to add it at a start and then the
input of the field going to be the output of those two functions so as you can see it's very easy to Nest functions
in Tableau let's go and hit apply and check the results as you can see everywhere we have the length of three
so again the order of execution going to be the one just deep inside the upper function then the left function then the
last one to be computed is the length function so that's it this is one method on how to create nested calculations in
Tableau but there is another method on how to do that and that's by creating a second calculated field using the first
calculated field let me show you what I mean so we can go and close this one over here and let's create a new
calculated field so we're going to call it second calculated field so what we're going to do inside it is to use the
output of the first calculated field this example it is the country new so this is our first calculated field and
then we're going to multiply it with two for example so here again the order of the computation going to be first tblo
has to calculate the first calculated field so it's going to calculate the upper left and length and then at the
end it's going to come over here and multiply it with two so let's go and hit okay and with that we got a new
calculated field let's drag and drop it on The View so as you can see the is is going to have the value of six so when
do I use the first method and when do I use the second Method All right so I'm going to show you how I usually decide
on this let's go to the our first calculation and as you can see those intermediate steps if they are not
important steps like you don't want to use them in any other visualizations then it doesn't make any sense to create
for each intermediate steps a new field inside your data source then the data source can explode and you can to have a
lot of fields that are not necessary so in this situation I'm going to have all those intermediate steps in one
calculations but there are another scenario where you have a very complex calculation where the code can to be
very huge and and it's really hard to maintain everything in one calculations so there I try to split it into steps
and each step going to have like one field in the data source and the last scenario where those intermediate steps
are really important for something else for different visualizations or maybe as well for any other different
calculations and in order to not repeat myself and doing the same calculations over and over I go and create a
dedicated calculated field for each intermediate steps only if they are important all right guys so that's all
for the Ned calculation and that was an introduction to calculations in Tableau they are really important to make great
visualizations and don't worry on the next videos we're going to learn more and more about calculations in
Tableau in Tableau we have many different functions that we can use inside the calculations and in Tableau
we can categorize them into four different types of calculations in this tutorial we're going to talk about them
but first we're going to have a very simple example to understand how they work and how they interact with each
others so let's go all right so now let's say that you have the following product table inside
our data source where we have informations like the product prices quantities and so on those data are the
original data that we can find inside the data source and now let's say that we need a new field inside our data
source to show the data of their revenue in order to do that we can simply create a new calculated field where it going to
multiply the prices with that quantities so now with that table going to go and create a new field inside our data
source to store the result of the calculations inside it so table going to go row by row by multiplying the prices
with the quantity so for example for the first row it's going to multiply 20 with two and tblo going to go and store it at
the new field then table going to jump to the next row and do the same exact thing so as you can see Tableau is
processing each rows individually and independently from each others when the calculations is happening on one row we
don't care about the informations that is present in the other rows so tblo going to focus only on one row at a time
this type of calculations we call it roow level calculations and the level of details we have it here is the lowest so
we have the level of detail from the data source it's very important to understand that this type of
calculations is the only type that will not go and aggregate the rows of the data source and as well the only type
that going to store the results at the data source so that means Tableau will not go and calculate the result of this
calculations each time you are using it in the visualizations so it's going to like pre-calculate it and store it in
the data source and the calculation will not be done on the fly all right so now let's move to the visualizations and
let's say that I would like to show the total revenue of each product and for that we can use the function sum to
summarize the values of their revenue and we can go and add the dimension product to The View and Tableau here
going to show only three rows in the view a row for each product value value so that means we're going to have P1 P2
and P3 now this time Tableau will start summarizing and aggregating the rows in the data source and that's going to be
at the level of the dimension so for example table going to start with the first product the P1 and table going to
summarize the first two rows from the data source so we have 40 + 60 tblo going to write add the output 100
directly in the visualization then it's going to move to the next row we have the P2 here we have only one row at the
data source and the summarize of that going to be 20 and for the product three the P3 we have here three rows in the
data source so the summarization of 40 + 25 + 15 tblo going to have the answer 80 at the visualizations so this time as
you can see Tablo is not processing the rows of the data source one by one and individually instead Tableau going to go
and summarize group up the row of the data source at the visualization level this type of calculations we call it
aggregate calculations and it's going to be calculated on the Fly that means the result of these functions of those
calculations will not be extra stored inside the data source and now it's very important to understand the level of
details of this new table that we have in the view it has lower level of details as the data source and the one
who controls the level of details is the dimension that we have on The View so the dimension that we use in the view
going to control the level of details for the aggregate calculations and that's why we have another type of
calculations because of that let's say that we have another scenario where you say you know what I would like to
control the level of details I want my calculations to show the total revenue of each category so here we can use
different functions like the fixed function so we're going to have fixed category and then sum the revenue so
that we are telling Tableau okay find the total revenue but this time it's going to be fixed it's going to be
connected to the dimension category so let me show you what's going to happen table going to go and check okay what is
the CATE of pay one it is the category a and now the next question what is the total revenue of the category a so here
tblo going to summarize 40 + 60 + 20 and the result going to be 120 and here Tableau will not show the total revenue
of the product pay one but instead of that we are showing the total revenue of the category a the same thing can happen
for the next product we have pay2 it belongs to the same category to a so the total revenue of category a is again 100
12 and then the last product pay3 it belongs to different category this time to category pay and the total revenue of
that going to be 40 + 25 + 15 the output going to be 80 as a total revenue for the category B so now who is controlling
the aggregations it's not anymore the dimension that we have on The View but instead it's going to be the dimension
that we specify on the calculations this type of calculations we call it LOD Expressions level of details expressions
and here the same thing like the aggregations it's going to happen on the Fly nothing going to be stored inside
the data source all right so now moving on to the last calculation type that we have in Tableau let's say that after I
got the result in the view I would like to calculate the rank of the products based on the data that is displayed in
the view and in order to do that we can use the function rank of the summary of the revenue so what can happen this time
tblo will not go and query the data source instead of that tblo going to go and query the visualization itself so
here it's like we are aggregating the aggregation So based on the value that is displayed on The View we can find
that the product one pay one has the rank one then pay2 has the rank three and pay3 has the rank two this type of
calculations we call it table calculations and it is unlike all other types it is based on the context and on
the data that is displayed on The View and it will not go directly and query the data source it is as well commuted
on the Fly that means the result will not stored inside the data source and if we are talking about the level of
details it depends as well on the visualization so it's going to depend on the dimension products all right guys so
with that we have now a big picture about the four different types of calculations inside Tableau and we can
see how Tableau going to compute the calculations and present the data at the end in the
results all right so now we're going to start with the first type of calculations we have the row level
calculations and here we have a lot of functions under this category if you compare to the other types so here we
have the number functions string date null logical functions there are a lot of functions but we're going to cover
them all in the next tutorials so now let's go in Tableau and try a few of those calculations okay so now back to
Tableau we're going to go to the small data source and then we're going to go to the orders as you can see we have
here the quantity and as well the unit price now we're going to go and calculate the revenue where we're going
to multiply the quantity with the unit price in order to do that we're going to create a new calculated fields in the
data source and this going to be row level calculations type so let's go and create a new calculated Fields we're
going to go to the data pane right click on the empty space create calculated fields and let's give it the name
revenue and then the formula for this going to be quantity multiplied with the unit price and now you might ask me
where do I find in Tableau all the functions that are related to that type Ro level calculations well there is no
specific place for that but there's like orientations for it so if you go to the documentation over here and check those
groups you will not find directly the types of the calculations but you will find some groups that are similar to
those types for example if you can see over here we have the table calculations if you go inside it you can find all the
functions that we could use in this type and then we have another group called Aggregate and here you will not find
only the aggregate calculations but as well you will find the LOD expressions and the last one the last type is the
row level calculations is actually the rest so all other like the number string date type conversions all of those stuff
are row level calculations all right so now back to our calculations let's go over here and hit okay and with that you
can see that tblo did immediately create a new field in our data Pane and now as I told you if you are using Ro level
calculations tblo going to do the pre-calculations and store the results immediately in the data source let's go
and check that either you can go to the data source page or we can go to this small icon over here it says view. so
let's go inside and check the results here we have to switch to the orders and now let's scroll to the right you can
see we have the original field we have the quantity and as well the unit price but we have as well our new calculated
field which is like any other field that we have in the data source we have the revenue over here and as you can see
tblo did immediately stole all the results of this calculated field in the data source even though that we haven't
create anything yet in the visualizations so that means tblo going to prepare it for you in the source and
we can check the result for example here we have the quantity one the unit price 215 we're going to get the same of
course and here the things are multiplied with two so as you can see we are now multiplying the quantity with
the unit price and now we can see very clearly that the roel calculations will be calculated and performed on the row
level individually and independently from each others so the information that we have in the other rows will not
affect the calculations of the first row all right guys so that's it this is how the row level calculations works in
Tableau okay so now we're going to move to the next type of calculations we have the aggregate calculations and here we
have few calculations if you compare to the RO level calculations we have Max Min average count count distinct sum and
attribute again all of those going to be covered in details in next tutorials but now we're going to go in Tableau and try
a few of them all right everyone so now we're going to go and build a view where we have the total revenue by products in
order to do that we're going to go and get the product name from the small data source and let's put it in the view now
it's really important to understand the concepts so now the product name is the dimension that can to define the level
of details in this visualizations so this means in this view we have five rows and this is completely controlled
by the product name so now I want you to understand how to pick which type of calculations we going to use now to
answer this question we start always with the first question do we have to aggregate the data since the task saying
the total revenue that's me there's like an aggregation and summarizations well that means we cannot
use the roow level calculations then we have to use the other types for aggregations then we are left with the
three types now the next question going to be do we have all the data in the view well as you can see in our table we
have only the dimension informations we don't have anything about the revenue so that means no we don't have all the data
inside the view and that's going to means we will not use table calculations type because the table calculations
types always depend on The View so if you don't have the data in the view you cannot use table calculations with that
we are left with two options either we can use the aggregate calculations or the LOD calculations well the last
question you're going to ask does the level of details that we have in the view going to fulfill my requirements
well in this example yes because we want to have the total revenue by products so we are talking about the product and the
dimension that we have inside the view exactly fulfill the level of details so that means we can stay with the level of
calculations that we have inside the view and we don't need to use any LOD Expressions so if you follow those three
simple questions you can easily identify which type of calculations you need to solve your task and in this example it's
going to be the aggregate calculations so let's see how we can do that and since the aggregate calculations are the
default methods in Tableau in order to aggregate any data or any measure it's going to be really easy to create so all
what we need is the revenue so just drag and drop it here on top of those numbers and with that tblo going to create
immediately an aggregate calculations we can see it over here the sum of their revenue and that's because it is the
default methods on aggregating data tblo goes for each product inside the data and start aggregating all their revenues
that are related to this product and now the next step what I usually do I go and validate some examples so I go and pick
some of those products and start summarizing the value to check whether the value that I'm seeing in the
visualizations is correct let's go and create a new sheets and here we want to go to the lowest level in order to do
that we're going to take the order ID The View and let's take now the product name we can take the categories as well
and then let's take their revenue and put it on the APC over here let's make it a little bit bigger in order to see
the names and then we can go and sort the product names so now we can go and pick any of those products in order to
validate the ansers let's take the LG full HD monitor as you can see the total sum should be more than 3,000 so let's
go back to our aggregations and check the G full HD you can see it is above the 3,000 that means everything is fine
and with that we got the total revenue by products and of course we have done this in the quick way where we drag and
drop the field to the view but if you want to do it as calculated field in order to reuse it later in different
sheets we can go and create new calculated Fields let's call it total revenue and then we're going to have the
same syntax so the sum of Revenue and this time we're going to use the nested calculations so we have it already in
another calculated field so let's go and click on that and as you can see the calculation is valid let's hit okay and
we got with that a new measure in our data pane so if you go and replace it you will get exact results so as you can
see in the results nothing changed the only advantage to use this is to reuse it in different sheets and as well in
different workbooks all right guys so that's all for the aggregate calculations in
Tableau all right guys the third type of calculations in Tableau we have the LOD calculations or the level of details
expressions and here we have only three Tableau functions we have the fixed include and exclude so now let's go in
Tableau and create one of those functions all right so now we have the following task where we want to show the
total revenue by category but using the same view so we're going to stay with the same informations we're going to
have the product name we're going to have the total revenue by the product but I want to see side by side their
total revenue by category so let's go again through the three questions the first question is are we doing
aggregations well yes that means we cannot use R level calculations then the next questions are the data that we have
in the view enough well it's not here it's not the total revenue by category it's by the product well that means we
cannot use the table calculations now we come to the last question does the level of details in the view going to support
me to solve the task well the answer is no and that's because the level of details inside the view now defined by
the product name and it has higher level of details than the category we want to have the total revenue by category so
the level of details that we have in the view will not support me that's why I cannot use here aggregate calculations
and I have to go and use LOD Expressions so as you can see very simple questions and it's going to move you exactly to
the right type of calculations in Tableau and now you might say wait wait wait I can go and add the category
informations to The View and then I have the level of details of the category well this will not work and that's
because the product name has a higher level of details let let me show you what can happen if you bring the
category so let's go and grab the category to the right side over here you can see nothing going to change we still
are at the five rows and that's because of the product name even if you move it to the left side over here we don't have
here two rows we have here five rows if you can check the details over here we have five marks so that's why even if
you are adding the category nothing going to change we are still with the product level of details so now let's go
and create a new calculated field to use the LOD expressions or calculations so let's go to the side and create a new
calculated field we're going to call it total revenue by category and the syntax don't worry about it we're going to
learn it in a separate tutorial about it so it's going to have the following syntax fixed then we have to specify the
dimension that going to control the level of details of the results it's going to be the category and then what
we are doing we are aggregating the revenue so we have to add here sum of Revenue and then we have to close it so
that says the calculation is valid and everything is fine let's go and hit okay so as usual we get get a new calculated
field in our data Bane over here so let's get the result and let's drag it over here to see the data so we can see
for each row the total revenue by the categories so for the first one it's going to be the total revenue by the
accessories the second one the same because it belong to the same category the third one the same but the fourth
one you can see it belongs to different category and that's why we're going to get different numbers so that's it this
is why we need LOD calculations in tableau okay so now we're going to move to the
last type of calculations that we have the table calculations and here we have as well few calculations so we have
their running window rank first last index lookup and so on again here we're going to have dedicated tutorial for
those stuff but now let's go and try one of them all right everyone so now we're going to move to the last task for this
view we want to show the running total of the revenue by the products so here we're going to ask again the three
questions are we aggregating well yes because we are having the running total of the revenue so we cannot use the roow
level calculations the next questions are the data that we have in the visualizations are enough to solve this
task well yes and that's because we have the total revenue by the products and the view and based on those informations
we can build up the running total of the revenue by the product so we have actually everything in the view in order
to solve the tasks and that's why we're going to go and use the type table calculations and we will not bother with
the third question whether it's aggregated calculation or LOD because it is table calculations so let's go and
create a new calculated field we're going to call it running total revenue so the Syntax for that is as well very
simple we start with the running then we have to select which aggregation type it's going to be the sum and then we
have to go and specify which data going to be calculated inside this table calculations and here we have only two
informations so either we're going to use the total revenue or the total revenue by category the LOD but we are
talking about the total revenue by products that's why we're going to include it it over here it's going to be
the sum of the revenue and that's it and the calculation is valid so let's go and hit okay and we're going to take our
measure and put it as well on The View to check the results so with that we can see very nicely the running total of the
revenue it's very simple it starts with the first value from the total revenue then the next value going to be based on
the previous Value Plus the total revenue so those two values going to be added to each other in order to get this
value then the next one the same so the previous Value Plus the current total revenue as you can see we have nothing
here that's why we are getting the same value so as you can see as we are moving down we are adding more total revenues
to the total number and now it's very important to understand that that the table calculations are very sensitive to
the data that is displayed in the view so any change to this structure we're going to get different numbers at the
output and this is not the case for the aggregate or the LOD calculations let me show you what I mean for example let's
go and just change the sort of the data inside the product name so let's go over here and make it descending for example
you can see that the aggregate calculations or the LOD the values are the same it just change the sort but the
values inside the table calculations did change completely because we have now different sort and table going to
recalculate the running total based on The View so that means any interactions in the visualizations it can affect the
table calculations functions and it completely based on The View so that's it for now this is about the table
calculations in tableau all right guys so now we're going to talk about the order of computations of
those different calculations types that we have in Tableau so now let's say that we have the following calculations and
it's very similar to the nested calculations here we have different types so we have the rank for the table
calculations we have the sum as an aggregate calculations and we have the quantity multiply with the price as a
row level calculations so the first thing to be executed is always the row level calculations so the first one
going to be quantity multiply with the price then the second type to be executed in Tableau going to be the
aggregate calculations it's going to be the sum function in Tableau and the last type of calculations that's going to be
executed in Tableau going to be the rank function the table calculations so again Ro level calculations as the first then
the aggregate calculations and always the last one the table calculations okay so now let's go and
quickly recap how to choose the right calculation type here we have three questions we start with the first one do
you have the aggregated data if no then go and use the roow level calculations we are at a row level if yes then we
jump to the next question is all the needed data already available in the visualizations if yes then we can use
the table calculations if no then we have here the third question is the level of details in the visualizations
matches the question or the requirements if yes then we can use the aggregate calculations if no we can go and use the
LOD expressions or calculations so if you follow my decision tree you can simply find an answer for that all right
guys so with that you have now an overview of the different types of calculations that we have in Tableau
next we're going to do Deep dive in each type of them and we will start with the RO level calculations here we're going
to cover a lot of functions in Tableau that are very important to do data manipulations and Transformations and
generate as well new informations that you need for your visualizations all right so now we're
going to start with the first type of calculations the roow level calculations and in this tutorial we're going to
cover the number functions in Tableau so the main purpose of the number functions in Tableau is to manipulate and
transform numerical values so we can use them on any field with the data type number and the most important use case
for the number functions is to simplify the numbers so here we have three functions we have the cing floor and
round in order to round the numbers to similar form and as usual first let's understand the concept behind them then
we can practice in Tableau so let's go all right so now let's say that we have the following scenario we have
build view from the subcategories and the sum of sales now if you take a look to those numbers you can see that they
are large numbers with a lot of fractions a lot of details we have three decimals over here so those details
going to make make it really hard to read those numbers in the view instead of that we can round those numbers to
make it easier to read and hide those small details that are unnecessary here so if you take the sales the rounded
sales you can see now we have smaller size in the numbers and we rounded all those fractions all those decimal
numbers so with that you can see if you compare the right to the left it's easier to read right so now let's learn
how this works each decimal number like for example 1.4 it has always two integer neighbors think about it like we
have a room it has a ceiling and floor in this example the 1.4 has the ceiling of two and the floor of one and here we
might be in situation where I don't want to deal with those details with those fractions I would like to have a whole
number a two or a one and here exactly we have two options either we're going to move it to the ceiling to the higher
number or we're going to move it to the floor to the lower number so if you decide to use the ceiling function the
number going to be two so what we are doing here is we are rounding up the number to the higher value to the
ceiling or we are moving it to the floor so that means we are rounding down the number so the floor function going to
round down the 1.4 to one and now you might say you know what I don't want to decide whether it's going to go to the
ceiling or to the floor I would like to have it automatic so it should go to the nearest integer and here we can use the
round function let's have the following example let's say we are at 1.3 if you use round we going to go to the nearest
neighbor the nearest neighbor going to be the one so the round going to move the value to one but now let's take
another value 1.7 so here the nearest neighbor is not the floor it is the ceiling so it's more near to two if you
use the round function it's going to convert it to two and now let's say that our value is exactly in the middle so
1.5 what can happen to the value if I use round because it has exactly the same distance to the ceiling and to the
floor and here what's going to happen is it going to be rounded up to the ceiling we have to have only one value so 1.5
the round of that going to be two so as you can see this is how those three functions works all we think about it's
like a room you have a ceiling and floor all right so now let's compare the three functions side by side we're going to
start with the ceiling so the ceiling going to round up the numbers the syntax in table going to look like this ceiling
and it accept only one argument the original number for example the ceiling of 1.2 is going to be two ceiling of 1.8
going to be two ceiling of 1.5 going to be two we are always going to the higher number let's move to the next one it's
going to be exactly the opposite so the floor going to round down the numbers to a lower value the syntax here is floor
it accept as well only one number the examples are floor 1.2 going to be 1 1.8 going to be 1 and 1.5 can be as well one
we are always going to the lower number now let's go to the last one we have the round it's going to round the numbers to
the nearest integer the Syntax for that going to be a little bit different we have round then the original number then
we have a decimal here it's optional of course here we can decide as well whether we're going to see for example
one decimal two decimals and if you leave it empty it going to round it to a whole number so now let's go to the
examples for the same numbers so if you round 1.2 it's going to go to the floor the nearest going to be one if we round
1.8 the nearest going to be the ceiling so it's going to go to the two and if we round 1.5 exactly the middle it's going
to be rounded up to the ceiling so we have it two so that's it this is how the three functions work now let's go back
to Tableau and start practicing all right guys so back to Tableau let's create now A View that
we're going to show the orders with the sales so we're going to stay with the small data source let's take the order
ID put it on the rows and let's grab the sales to the view so as you can see the sales don't have any fractions and
that's because not that the numbers are rounded it's just the format is different so in order to show the real
values we have to change the format so in order to do that we're going to go to the measure sales over here right click
on it and go to the format then we're going to go to the left side we have here numbers let's click on this menu
and go to the standard so once you do that you can see that we have the row data as we have it in the data source so
now we want to round those numbers to make it similar to read in The View in order to do that we have the three
functions and we going to start with the ceiling so let's close this over here and create a new calculated field so
right click over here in the white space create calculated field we're going to call it sales ceiling the syntax is
really easy so it start with the ceiling keyword and then inside it we have to have our field the number so our field
is the sales and as you can see the calculations is valid so let's hit okay and as you can see we have now the field
the new calculated field in the data source so let's bring it to the view let's go and drag it over here and as
you can see now we have our new field let me just make it a little bit bigger and all those values are rounded so
let's take the first value we have 215 comma 88 as we are rounding up we're going to go to the next higher value
which is 216 everything is fine let's check this over here so we have 56 comma 11 and as we are rounding up we're going
to go to the next integer which is 57 so everything is fine and the ceiling functions is now working all right so
next we're going to go and do exactly the opposite we're going to round down the numbers to the floor so we're going
to go and create a new calculated field and we're going to call it sales floor the syntax is as well really easy the
keyword is floor and our value going to be the sales so that's it the calculations is valid let's click okay
and our new field is already in our data source let's grab it to the view so the first value was 215a 88 as we are
rounding down to the integer below it it's going to be be 215 and this value over here we have it
56 comma 11 as we are going to the floor it's going to be 56 so everything is fine and as you can see it's exactly the
opposite of the ceiling all right so next we're going to go and round the numbers automatically to the nearest
neighbor using the round so we're going to go and create the third calculated field we're going to call it sales Round
And the functions is really easy so it starts with round and it accept two arguments the first one is a must it's
going to be our number sales and the second one going to be optional in case we want to decide on the number of
decimals so here we don't want to use it we're going to leave it as default we don't need any decimals or fractions so
we're going to leave it as like this sales and that's it so as you can see the calculations is valid and we're
going to go and hit okay now our third calculated field as well in the data ban let's just grab it to the view and check
the values so now the first value 215 comma 88 it is near to the ceiling that's why the round going to take it to
216 the next one we had 56 comma 11 it's really near the floor that's why Tableau or the round function going to take it
to 56 so as you can see everything is fine and the numbers are moving to the nearest neighbor all right so now let's
say that we want to see the sales in our view but having only one decimal not two decimals like here in our example so in
order to do that we can round those numbers to only one decimal using the round function let's go and create a new
calculated field let's call it sales rounds one and we're going to use as well the same keyword rounds the number
going to be sales and then we're going to Define how many decimals do we want in this example we want only one decimal
so we're going to type here one so that's it as you can see the calculation is valid let's click okay and here we
have our new field let's bring it to the view and now you might say you know what nothing changed we still have everything
rounded to a whole number there's no decimals well that's about the format so let's go and change that we're going to
go over here right click on it and then let's go to format and here we're going to bring it to the standard once we do
that as you can see now we have only one decimal value we don't have two decimal values like the sales like the original
filled in our data source but now you might say okay maybe the round as well has decimals so let's check the formats
we're going to go to the round over here and let's click format and now if we bring it the standard as you can see
nothing is changing so that means we don't have really no decimals we have only a whole number all right so now you
might ask me when do I use ceiling and when do I use floor well there is no rule for that it really depend on the
use case and on the requirement for example if I'm building a dashboard for budgeting to plan a budget I would go
always with the ceiling to make sure that I'm not forgetting anything and I'm not short in the budget at the end so in
this use case I tend always to use ceiling and never use floor or round it's really depend on the requirement
and the use case so as you can see those three functions really makes the visualizations easier to read and more
simpler all right everyone so so far we have learned how to simplify the numbers in Tableau using the three number
functions ceiling floor and round and that's it for the first group the number functions next we going to learn the
string functions in Tableau all right so now we're going to focus on the second group of functions
in Tableau under the category roow level calculations we have the string functions and the main purpose of the
string functions in Tableau is to manipulate and transform the text values so any field in our data set with the
data type string there are many use cases and reasons to use string functions in Tableau for example we can
use it to clean up our data and bring our text to standard cases for example we can change the case to either lower
or upper and the next use case as well is about to clean up our data in Tableau by removing any unwanted spaces so here
we have three functions the left trim right trim and trim moving on to the next group or use case we have here
three functions to extract specific substring from a text so we have left right and mid the next use case is to
search for specific patterns and here we have five functions start with end with contains find and find inth then we have
another use case for the string functions to combine and split data inside tableau so here we have the
concat operator and as well split function and the last use case is to replace specific substring with another
substring so here we have the function replace so as you can see we have a lot of string functions and tools to
manipulate transform clean up the text values in Tableau and now we're going to start with the first use case about the
string functions how to clean up our data and bring our text to standard case using the two functions lower and U but
as usual first we have to understand the concept before we start practicing in Tableau so let's
go all right so now let's go and check the following data quality issue in our view if you check the dimension products
over here we have three values for the same word so we have keyboard three times in the view which is really wrong
and that's because the data quality from The Source system where we get the data from is simply low this happen if you
have like a lot of people working in a big project and you have a lot of products so they may enter like
different names for the same product so here we have a case issue in the product name and what I usually do in my project
I go and contact the source systems and tell them about the data quality issues that they have but sometimes it might
take long time until they fix it so in the visualizations we can go and fix and clean up those stuff and in Tableau we
have a lot of tools and functions to manipulate and clean up the dimensions so for example we can use the upper or
the lower functions in order to bring standards to the value use so if we go and use the lower we can to have the
following results so we can have in this example only three products in the visualizations and allthough three
values going to be aggregated for the quantity in only one row which is really correct so now if you compare the first
view with the second view you can see that we have improved the data quality in the visualizations so now let's go
and understand how those two functions works now let's have the following example about the customer's name the
names could be written like this the first character of the first name and the last name is capitalized or
everything as an upper casee or the opposite where we have everything in lower case so as you can see we can
write the customer's name in different cases now in Tableau we have to bring those names in standards and we have two
ways to do that either we bring everything to lower case or to upper case and now if you decided to go with
the uppercase for the customer's name what's going to happen the first customer going to be converted
completely to uppercase the second customer is already an uppercase so nothing going to happen it's going to
stay the same the third one it is low case so it's going to be converted to upper case but now if you want to go
with the lower name for the customers this is what's going to happen the first one the first customer can be converted
to a lower case the second one as well can to be converted from upper to lower the third one nothing going to happen
because it's already lowercase so as you can see with this function we are forcing the names to be either upper or
lower so we bring standards to the visualizations now we're going to go and compare those two functions together we
start with the upper it's going to convert the characters to upper case the syntax in Tableau going to be the
following it's starts with the keyword upper it accept only one field the string the output can be as well string
for example if we take upper Maria the first character is capitalized the output going to be string Maria in
uppercase so now let's go to the lower it's going to be exactly the opposite so it's going to conver the characters to
lower case the syntax going to be similar to here so we have lower than one field the string the output can be
as well a string the example here is lower Maria so Maria going to be in the output as lower case so those two
functions are simple and easy to use but still they are very important I tend to use them a lot in my projects to clean
up the data so now let's go back in Tableau and start practicing all right for those two
functions I have prepared an extra file with the low data quality in the product names so in order to connect this file
we have to create a new data source so let's go to the data source page over here and then we're going to go and
create a new data source then we're going to go to the text file you can find it inside the small folder so we
have here a CSV file called products low quality let's go and connect it it's only one table and if you check the data
grid over here you can see we have problems in the product one so you can see we have here keyboard in uppercase
keyboard in lower case or with the first character capitalized so now let's go back to our sheet and start checking the
data as well from there and now let's go to the data Bane make sure we are selecting the new data source we have
here a product one here we have the case issue so let's bring it in the view and check the values as you can see we can
find like five products but in reality we have only threes right so here we have the keyboard three times Monitor
and mouse we should have only three keyboard Monitor and mouse so we have a data quality issue in the product names
and tblo is case sensitive so it can present the data exactly as it is from The Source system let's take the
quantity and put it in the columns and as you can see those three values will not be aggregated together since T going
to think those are three different products let's show the values here in the labels and let's take it to the
color as well so now we're going to go and clean up the data using the lower function in order to do that we have to
create a new calculated field so let's go to the data pane over here right click on the empty space create
calculated field we're going to call it products lower so it start with the keyword lower and it accepts only one
value the string so we're going to have the products one and that's it so as you can see the calculation is valid and the
output going to be a string the product so let's go and hit okay and now if you check the data pin we have here our new
dimension the calculated field let's bring it to the view in the rows to start comparing the values the first one
as you can see it is an uppercase so the output going to be lower case of the keyboard the next one is already lower
case so nothing going to change the third one is completely uppercase from the original data but the output is
lowercase so as you can see we have all the names here in lowercase now if you go and remove the product one over here
you can see we're going to end up having only three values only three products which is is correct so with that we have
cleaned up the data using the lower case so now let's go and clean up the data this time using the upper function we're
going to do the same we're going to go and create a new calculated field let's call it products upper so we're going to
use the function upper over here and it accepts only one field our products so products one and that's it so the
calculation is valid let's click okay and now if you check the data bin we have new calculated field new dimension
so let's bring it to the view and start start comparing the values I'm going to bring as well the original field so the
first one is capitalized as you can see the output can to be an uppercase the second one is completely lowercase going
to be as well completely uppercase the third one nothing going to change so as you can see all the values now in upper
case so now I'm going to go and remove the others to see the final results as you can see we have only three products
in the visualization which is really correct and with that we have fixed the data quality using the upper case
all right so now you might ask me should I use a lower case or uppercase in My Views well if you're asking an IT guy
like me I'm going to answer like this it depends it depends on the fields that you are using in the views let's have
the following example so here we have two views the left one with the lower case and the product's name and the
second one is with the uppercase so if you take a look now to those two views what do you think it is easier to read
well if you have a normal text or a long text like the product's name the customer custom name and so on it's
always better to use a lower case the lower case are like easier to read compared to the uppercase the upper case
can take as well more space it's more aggressive and really hard to read so for this scenario I would go and
recommend you to use the lower case in modern design they tend to use lower case since it's provide more sleek and
minimalist look in the website and in the look and feeling for the visualizations so the lower case is
easier to read it's more modern if you compare it to the upper case it's hard to read and it's like someone is
shouting let's take now another example we have here an aggregations for the country abbreviation so here we have it
as a lowercase and as well as the uppercase this time if you compare them together you can see that maybe it's
more better to use the upper case and that's because since it's very short the abbreviations has maximum maybe three
characters it's really hard to see in the visualizations they are really small so if you have it like a big characters
it's easier to read so with the abbreviation I always tend to use the uppercase so
the abbreviations if they are written in uppercase they going to bring standards and they going to avoid
misinterpretations of the data so if you look to the right side over here you can understand immediately okay here we are
talking about countries but if you are on the left side you might get confused for example are we talking about USA or
the word us the same goes for Italy is it like the it that we use it in sentences in the pronoun or is it like
the abbreviation of Italy so here here if you write it in lower case you might introduce some misunderstanding and
misinterpretations so for the abbreviations I always tend to use uppercase it's more clear and easy to
read for short names so that's why the answers that comes from the it it depends it depends on the use case the
requirements and so on so sometimes we go with the lower sometimes we go with the upper but 90% I go with the lower
case for the names and so on but only for the Appropriations I go with the upper so with that you have at least
some orientations your visualization all right so that's all about how to clean up the data by bringing our text to
standard case using the two functions lower and uper next we're going to start talking about the three functions left
trim right trim and trim All right so now we're going to talk about another string functions in
Tableau to clean up our data by removing unwanted spaces using the three functions left trim right trim and trim
and of course as you ual we have to understand first the concept behind them and then we're going to practice in
Tableau so let's go all right so now we have the following scenario where we have again a
bad data quality in our view if you check the products we can see that we have four times the keyboard so what is
going on we have here no case issue like all of them are capitalized on the first character so there is no lower case
uppercase everything is fine why T didn't aggregate all those Val values in one row in one product because here we
have only three products so what is going on here what happened well we have the dirty spaces in the product name in
the keyboard there are like unwanted spaces it's really hard to see in the visual you can see that like everything
looks fine right but there is spaces inside the keyboard and we have to remove it so now in order to clean up
the data and remove those 30 spaces we can use one of the three functions left trim right trim or trim and if you apply
those functions on the product name we're going to get a result like this only three products and everything going
to be fine so let's understand how those functions works so let's have the following simple examples let's say that
we have the word monitor but on the left side we have a white space in order to remove it we can use the Tableau
function lift trim so lift trim going to remove any unwanted spaces from the leftt side of the ward and now we might
have the opposite situation where we have the monitor but on the right side there is a white space in order to
remove those spaces we can use the functioning Tableau right trim so right trim going to remove any spaces from the
right side of the world moving on to the third scenario we have the same word monitor but this time on the left and on
the right there are white spaces so in order to remove those spaces either we can use both of the functions left trim
and right trim or we can use the third function a trim if you use the trim function in Tableau for this scenario
it's going to remove all the white spaces from the left side and as well all the white spaces from the right side
all right so now we're going to go quickly compare those three functions the LIF Tri going to remove any leading
spaces the right trim going to remove any trailing spaces and the trim going to remove both of them the leading and
trailing spaces and the syntaxes in Tau are really simple so for example we have here the left trim key word then it
accept only one string filled the output going to be a string value so for example let's say we want to lift trim
this value we have Maria on the left side we have a white space and as well on the right side so if you use a left
triim it going to remove only the leading spaces so it can to just remove the space from the left and going to
leave the space that we have on the right because it's only left trimming let's go to the next one it's exactly
the opposite but the syntax is almost the same so we have a right trim it accept the field string the output going
to be as well a string value so if we stay in the same example it's going to remove only the trailing space so the
space on the left side going to in this example now let's move to the last one I think you already got it we're going to
use only the trim here not the left or right so both of them and it accept as well a string field the output going to
be a string value and the example going to be the following so Maria with the left and right spaces what's going to
happen we're going to remove the left space and as well the right space so those functions are really easy to use
and very important to improve your data quality in the visualizations let's go back to Tableau and start practicing
okay first make sure to select the right data source so we can stay with the products low quality since I prepared
there the examples and now we're going to go with the product two so just drag and drop it here in the view and as you
can see we have now four products for the keyboard now it's really hard to see where are those white spaces for the
first two you can see they are like little bit shifted to the right but for the second two keyboards we are not sure
whether they are like on the right side a white space or not and the situation going to be really bad if we switch to
different visualizations so let's take the quantity and now in the bar diagram it's almost impossible to see whether
there are like any white spaces so if I'm facing this situation in my projects I go first and start counting how many
characters do I have in each product so I calculate the length of each word so in order to do that we're going to
create a new calculated field let's go and create a new one and we're going to call it products
length so the keyword for that to calculate the link is l n and that's it then it accepts only one field string
field and the output going to be a number so our field going to be the product two make sure to select the
correct one and that says the calculation is valid let's click okay and since the output going to be a
number tblo going to go and create a continuous measure so I'm just going to remove the quantity from The View and
let's bring our new calculated field to the view so the length of the first one has a nine SI means we have only one
white space the second one has two white spaces the third one is correct the first one is as well has a one white
space so with the links function we can easily detect whether there are dirty spaces in our wordss so now in order to
remove and clean up those problems we going to use the trim functions so let's start with the LIF trim and we're going
to go and create a new calculated field so let's go and do that we're going to call it product LIF trim and we're going
to start with the syntax LIF trim and it accept only one string field it's going to be the product two make sure to
select the correct one and the calculation is valid let's go and hit okay and now we notice that
table created a new dimension because the output is a string let's go and put it here in the view so now what going to
happen to the values inside the products all the spaces from the left side going to be removed or trimmed but again here
it's really hard to see from The View whether everything is fine so we're going to go again and calculate the
length of the new field so let's go and change the calculations inside our calculated field so instead of having
the product two we're going to remove it and insert the new dimension let's click okay all right so now let's check the
result as you can see we have some values fixed so the first one we have it as eight the second one we still have a
space the third one is anyway correct the third one is as well incorrect so as you can see the situation is now a
little bit better but we still have spaces that means we have spaces on the right side so in order to fix this we're
going to go and trim from the right side so let's go back to our calculations the left trim let's edit it and at the right
trim so we're going to go over here we're going to have nested calculations so right trim and we want the result
from the left trim so let's go and hit okay but maybe I'm going to change the name to trim so let's hit okay so what
can happen to the values inside the product we are trimming everything from the left and as well from the right and
as you can see now the length is as well correct so all those values has the length of eight so in order to test this
as well we're going to remove the product two from from The View and we have here only three values and of
course the links doesn't make any sense here because we are summarizing the links of all the products inside the
orders so instead of having it as a measure maybe we can convert it to Dimensions to not have any calculations
so I'm just going to remove it from here and just add the product length and as you can see everything is fine and now
of course for this scenario we have an easier solution we can just use a tra instead of using left and right frame in
one calculation so let's go and do that we're going to go back to our calcul ation and edit it so we're just going to
remove everything we're going to use the keyword trim and then it accept only one field it's going to be the product two
and as you can see the calculation is valid let's click okay so as you can see nothing going to change in the view
we're going to get exactly the same results so with that we have cleaned up the values inside the product by
removing any dirty or unwanted spaces all right I want to show you one more methods on how to detect whether
there's like bad equality in your data by having unwanted spaces and that's especially if you have a big data source
if you have a lot of values it's really hard to detect those stuff if you are using the links function so I'm going to
show you now how I usually do it if I have a big data source so what I usually do if I have suspicion about one field
where I think the users are like manually entering the values is that I go and count the distin value inside
this field so now let me show you how I usually do it let's go and create a new calculated fields and we're going to
call it products count D so the Syntax for that is going to be count and then the word d
we are counting the distance value inside our products the field going to be product two the output for that is
going to be a number so the calculation is valid let's go and hit okay so as you can see on the left side we have a new
continuous measure it's going to count how many distinct values we have inside the products so let's see the results
I'm just going to go and remove everything from The View I'm going to take the count D and put it on the text
so now the result is going to say I have six different products inside my data source but I have suspicions about it so
now what I'm going to do I'm going to go and start trimming the values inside the products and my expectation going to be
the following if the number going to stay the same then we don't have any spaces but if the number going to go
smaller then we have unwanted spaces inside the products so let's start testing that we're going to go to our
calculation and start adding our trims we start always with the left trim or right trim why we don't go immediately
to the trim because if you are trimming everything from the left and the right this can has a bad performance in
Tableau because it need resources so if you are only left trimming or only right trimming it's going to be easier for
Tableau to do it but if you always go immediately to the trim you might have bad performance so that's why I always
start with the lift trim so let's go to the lift trim and check the results so I'm just going to add it to the product
over here so with that we are first lift trimming the product two then we are counting how many distin values we're
going to see inside this database the calculation is valid let's hit okay all right so now we moved from six to four
products this is alerting for me that means there is like leading spaces so now the next step what I usually do is
to go and test whether we have any right spaces on the right side for that either I'm going to add a right trim or I'm
just simply going to use the trim so now if we add the right trim and the trim and the number going to stay the same
for that means we have only problem with the left spaces but if the number going to go smaller that means we have as well
right spaces so now what we're going to do we're going to go again to our measure and edit the calculation and
instead of having left trim I'm just going to have now trim to test as well the right spaces so let's go and hit
okay now as you can see we went from four to three that means we have as well right spaces not only left but as well
right so the total number of products went from six to 4 to three so this is how I usually do it to decide decide
whether I'm going to use only left trim or right trim or both of them instead of using immediate trim I saw a lot of
projects and a lot of developers tend to like overreact with this so if they see like a string value they go immediately
and trim it just in order to have a correct result at the Tableau visualization but believe me if you do
this always you're going to have bad reaction in Tableau and you're going to have bad performance so take little time
investigating whether it's really necessary or not all right so that's all about how to clean up our data by
removing an wanted spaces using the three functions left trim right triim and trim next we're going to talk about
another group the left right and mid okay so now we're going to cover another group of string functions in
Tableau to extract specific substring from the text using the three functions left right and mid and as usual let's
understand the concept then we can practice in Tableau let's go all right everyone so in real scenarios
in real life projects the data that comes from the source systems usually are way more complicated than the data
that you can find in samples tutorials courses and so on because the processes and read projects are way more
complicated so the example that we can see here could be the product name inside your project so here you can see
we have a lot of informations in only one field for example we have the Canon this could be the product name the next
one we have the product ID and the third one is the product code all those informations we might find it underneath
the product name in only one field so in the visualizations we might be interested in only one piece of
information not the whole thing so we could be interested in only the Canon the product name or we need only the ID
so 789 or we want only the code to be in the visualizations so we need inow such a function or Tools in order to extract
those piece of informations and split the one field to three fields and in Tableau there are a lot of functions and
ways in order to achieve this goal one of them is to use the functions left right and mid in order to cut this field
into multiple Fields so we're going to start now with the first one let's understand the lift the first thing to
understand is that each character in our string has a position number for example we have the C it has the position number
one the A2 N3 and so on until we reach the last character five it has the position for 14 so we are counting from
the left until we go to the right and now in this example we are interested only on the product name so we're going
to focus only on this one and as you can see it ends with the position five so the syntax in Tableau in order to do the
left is the following it start with the left then it needs two arguments the first one is the field itself so the
string itself then the numbers of characters that we want to keep and the output the result going to be a string
value so for example we're going to take left the then our value and the number of characters going to be five so we are
keeping five characters from the left side so let's see how this going to work so we going to start counting from the
left and we move to the right so the starting character is C so we start counting 1 2 3 4 five and this is
exactly the number of characters and we make a cut here anything after the five or after n going to be removed and we
keep here only five characters we're going to have the output of Canon so in this example we are cutting all the
values after the character with the position number five all right so this is how the LIF function Works in Tableau
let's move on to the next function it's exactly the opposite we're going to have the right function let's say that we are
not anymore interested in the product name we would like to have an extract the product code the last four
characters of our string and now if you are considering to use the right function what can to happen the position
number of the characters can be exactly the opposite we're going to start counting from the right side as we are
moving to the left so the first character going to be the character five the second one R the third e and the
last character number 14 going to be the C so now we want to focus on the product code and we're going to use the right
function the Syntax for the right function is very similar to the left so it start with the right keyword then we
need our field a string field then the number of characters the output going to be as well a string value so this time
going to be the example like this it can to have right our string then the number of characters that we want to keep from
the right right side is four let's see how this going to work so the right function going to start counting from
the right side and we move on to the left so we start counting from here 1 2 3 4 and that's it here we make cut and
all the characters after the position number four will be ignored will not be part of the results so at the end we're
going to get only four characters from the right side cer5 so this is how the right functions Works in Tableau we
start counting from the right side and we keep only like for example here four characters all right so now we're going
to move to the third one we have the mid function all right so now we want to extract the last piece of information
that we have in our string the product ID the one in the middle so we are not interested in the first part the product
name or the last part the code we want to get exactly this information in the middle if you are using mid we're going
to count from left to right exactly like the left function so the first character going to be the C and the last character
going to be the five the syntax in Tableau is slightly different as left and right so we start with mid then we
have three argument the first one as usual the string value that we want to manipulate the next one here is new we
can Define the start point where we going to start counting how many characters we going to leave then we
have the length here it's like the number of characters but this time it is optional so if you leave it we're going
to consider everything after the start point or if you specify it we're going to have exactly the same number of
characters that you define the output going to be here as well a string value so let's take here an example we're
going to have mid then our value we want to start counting from seven and we want to keep only three characters in the
output okay so now let's see how this going to work the start position to count the number is the position number
seven so we're going to start from this value and we're going to count three characters so one two 3 and cut so now
what we are doing we are cutting two things the starting position and the end position that means all the characters
before the starting point will be ignored will not be at the result and as well all the characters after the final
one at the cut will be ignored so the output going to be 789 so with that we extracted an information in the middle
of our string so this is how the mid function work so as you can see with those three functions with those three
Tools in Tableau we can cut anything in our string and generate a new data so now let's go and Tableau and start
practicing there are many use cases for those three functions for example let's start working with the URL the URL has
usually a structure and we want to extract part of the informations inside each URL in our data sources we have a
URL in the images so if you go to the small data source go to the product and here we have the product image let's
drag and drop it on the rows and check the structure so the standard URLs usually starts with the protocol then we
have a domain and then at the end we have like a file or something our files here are all images like we practice in
the image R so now the first task is to extract only the protocols from our URL now as the protocols are from the LIF
side I think you know already that we want to use the lift function so we can to go and count how many characters we
want to leave so we need five characters let's go and create a new calculated field because we need a new field we're
going to call it URL and then we're going to have the protocol so it start like this the left and then it needs two
arguments so the data that we need is product image we have it over here and we want to cut five characters so comma
we're going to specify here five so as you can see the calculation is valid let's go and try that out so we're going
to go and hit okay and as you can see on the left side we have our new dimension our new calculated field let's go and
bring it to the view so drag and drop it under the rows beside it and as you can see now we got a new field in our data
source where we have the protocol informations from our URL so everything is working fine and this is how you work
with the lift function let's go to the next use case where we want to extract the file extensions in our URL so we
want to get this part at the end from the URL so as we are speaking about the right side what we're going to do now
we're going to use the right function so here we need to extract around three characters let's go and create the
calculated field so we're going to go and create a new one we're going to call it URL file extension so it start with
the keyword right and then it need as well two arguments the string our field going to be the product image and how
many characters we want we want three so comma three so with that you can see the calc calculated field is valid let's go
and hit okay and as usual we have a new calculated field a new dimension in our data source just to deal with the file
extensions so let's check the values to see if everything is fine and as you can see we are getting all the file
extensions from the URL so as you can see it's really simple and we are with that generating new informations new
fields that we could use in our analyzis and they are based on the original data that we get from the data sources all
right so now let's move to the next task where we want to get the URLs starting from the domain name without having the
protocols so we want to keep anything after the double slashes in the string and this time we're going to use the
Tableau function mid let's go and create a new calculated field so we're going to call it product domain and here we're
going to start with a keyword mid it takes three arguments the first one as usual going to be the product image and
then when do we start cutting so here we have to specify the number 1 2 3 4 5 7 8 9
so we start cutting from nine and the last one is optional I'm just going to leave everything afterward so we will
not cut anything from the right side so that's it the calculation is valid let's hit okay so as usual we get a new
dimension new calculated field in our data band we use in the analyzes let's go and grab it and put it in the rows to
check the values so as you can see we start from the domain name and the protocol is cuted the whole value going
to be the rest and now next we have the following task for you all right so that the task says to extract the last four
digits of the phone numbers from the customers and to go to the addresses and extract only the street name so we're
going to remove the code and the word Street and now you can go and pause the video in order to complete the task and
once you are done you can resume it all right I think it's really easy so let's go to the small data source we're going
to go to the customers and grab the phone to the view now we want to extract the last four characters so we are
speaking about the right side right we're going to use the right function let's go and create a new calculated
field we're going to call it phone code and we're going to use the right function to cut from the left from the
right sorry so the string value is phone and we want to cut four digits so we're going to have the number of
characters going to be four so now the calculation is valid let's hit okay and take it to the results and as you can
see with DOs it's really easy we got the last four digits from the phone number all right so now we're going to go and
solve the next task we need need only the street names from the address so as you can see over here we have the code
and then the word Street and then we have the street name we want only this piece of information since we want to
start cutting over here we're going to use the mid function to define the starting point of the cut so let's go
and create a new calculated Fields we're going to call it address stet so we're going to use the function mid the first
value going to be the field address and then the starting point going to be nine the rest we're going to leave it as it
is it is so that's it let's hit apply and check the values so drag and drop in the view so as you can see with that we
have only the streets from the address we cuted the first part if you solve the task using like eight instead of nine
that's because you forgot to count the white space so if I just remove it and use eight I might get exactly the same
results but we have white spaces which is not really good so the spaces counts so it should be nine so that's it this
is really simple this is how you can extract informations in Tableau all right so that's all about this use case
how to extract specific substring from the text using the three functions left right and mid next we're going to start
talking about bunch of functions on how to search for specific patterns in Tableau okay guys so now we're going to
move to the next use case where we're going to learn how to search for specific patterns in our text using
calculated fields and here we have five functions we have start with end with contains find and find in and as usual
first we have to understand the concept behind them then we're going to go and practice in Tableau so let's
go all right everyone so the sear functions in Tableau going to be splitted into two groups the first one
going to return whether the substring exist or not in our text and here we have three functions we have the start
with end with and contains the output of those three functions going to be always either a true or false so we have a
bullion for example we have the function contains we have our string and we are searching for dashes so here the output
going to be either true or false in this example going to be true since we have it here twice and then we have a second
group of functions where it going to return the position of the string here we have two functions find and find inth
the output going to be the position number so we're going to get numbers out of those two functions so for example if
we take the function find for the same string and we are searching for the dash here we're going to get the output of
six so we are not getting true or false we are getting the position of the substring and here in this example can
be the first one it has the position number six so as you can see both of them could be used to search for
specific thing in our text but they answer different questions so the first group can answer the question whether
the substring exists in my text yes or no true or false but the second group can to answer my question where I do
find my substring so here we're going to get the position number of the search so now let's go and focus on the first
groups of functions we're going to focus on start with end with and contains okay so now we're going to start with the
first one start with let's say that we have the following text monitor lg- 4K the syntax in table going to be very
simple so it start with the keyword start with and it accepts two argument the first one going to be the string fi
it is the text where we want to search inside it the second one we're going to have the substring here we're going to
specify what we are searching for four the output as we learned is going to be either true or false so it is aoan so
let's take an example we have start with our text and we are searching for the word monitor so let's see how this can
work it's really easy so we start searching from the left and we move to the right so the start position for the
search going to be the M character so now tblo going to go and start matching the monitor here in our text starting
from M and as you can see here the first part of our text is matching with the substring that we are serving SE in for
so our text start with monitor which is correct so that's why tblo going to return it's true okay so now let's take
another one here we are asking does our text start with the substring LG of course if you are checking our word if
you start searching from the left to the right our text does not start with LG so Tableau will not find a match and it
going to answer with a false so that's it it's simple right we are just asking a question so we ask Tableau something
and tblo can answer with either yes or no okay so now let's move to the next function we have the NS with it's
exactly the opposite all right we're going to work with the same example and the syntax in Tableau is very similar so
here it starts with the ends with here it accepts to argument as well the string field where we're going to search
inside it and the substring here we going to specify what we are searching for the output going to be as well true
and false so let's start with the first example we are asking here does our text ends with 4K so here table going to
start searching from the right side moving to the left so now here does our text ends with 4K so yes the last two
characters is 4K that's why tblo going to answer was yes so that's it the output the result can to be true let's
ask another question does our text ends with LG well if you check the text over here it does not end with LG LG is in
the middle so the last two characters is not LG that's why tblo going to answer was false so the answer is no so as you
can see it's really easy we are just asking questions and Tableau is answering with either yes or no let's
move to the next one we have the contains okay so now we are working with the same example and the syntax is very
similar to the other two so here it starts with the contains and it accept two things the first one we need to
specify the text that you are searching inside it and the next one we're going to specify what we are searching for the
out going to be avaion true or false yes or no okay so now let's ask tblo the following question does our text contain
the word monitor so what tblo going to do is that it's going to search every everywhere so it will not search at the
start or at the end it's going to search everywhere and if the word going to be found anywhere inside our text table can
answer was yes which true so does our text contain the word monitor as you can see it's true so table can return yes
and now let's ask another question does our text contains the word LG well if you are searching over here you can find
it in the middle so that's why TBL going to answer as well with true so yes our text contains the word LG okay so let's
move on and ask the following question does our text contain the substring 4 G so if you check the text over here we
have the four we have the G but they are not together that's why table can to answer no we don't have the word for G
in our text so now as you can see the function contains does not have any restriction it going to search
everywhere it's not like start with and end with so the substring should not be at the start and at the end if the
substring exist anywhere then yes it's true if not then it's false so that's it this is about the three functions let's
go now in Tableau and start practicing all right guys so now you might ask me what are the use cases for
those three functions well I use them in two scenarios the first use case when I'm exploring a new data the Second Use
case is when I'm offering a new filters to the users okay so now let's start with the first one exploring the data
this is specially useful if you are new to a project or if you have a new data source so the first step is usually is
to explore the data and learn the content of the data source so if you are in this situation you might have a lot
of questions about the data so you have those three functions those three Tools in order to explore the new data that
you have okay then let's go and explore the products inside our big data source we have there a lot of products and I
would like to understand the content of my data source so let's take the product name to the rows and as you can see
Tableau saying okay there is like a lot of members I recommend to have only 1,000 but I would like to see everything
so I'm going to say add all members to The View and now as you can see we have a lot of products inside our data source
and I would like to understand the scope of my projects so what are the content of those products I would like to know
whether we have Apple products inside our data source so we're going to go and create a new calculated field to answer
that so we're going to say product starts with Apple so that's it we're going to use the function starts with so
starts with it need two arguments the first one going to be the text where we're going to search inside inside it
it is our product name so we are searching inside the product name so now what we are searching for is the word
Apple so I'm going to write it like this and everything is fine you can see the calculation is valid let's click okay
and as you can see on the left side we have a dimension with the data type Pion because we have yes or no true and false
so let's take it to the rows and check the results you can see over here we have a lot of falses and I'm going to go
and sort it in order to see the true so we can see over here we have have four products where the product name starts
with apple the others does not start with Apple so as you can see now we have little bit more insights about our data
let's go and ask the followup question does the product name contains anywhere the word Apple so not only at the start
or at the end anywhere in order to ask the question we're going to go and create another calculated field we're
going to call it products contains apple and we're going to use the function contains
it need two arguments the string that we are searching inside it is going to be our product name so what we are
searching for is Apple so that's it and the calculation is valid let's hit okay again here we
have a dimension called products with the data type true and false so Pion let's drag and drop it here but first
I'm going to go and make it a little bit bigger to see the header of the field so as you can see the first one is contains
the second one is start with so let's sort it by contains and as you can see we have around seven products where the
product name contains the word Apple so now let's check the results as you can see the first one we have it over here
the word Apple the second one is over here and the third as well over here and the rest those four products they start
all with the word Apple so as you can see with the contains functions we're going to get more results than that
starts with all right so as you can see we are learning more about the products inside our data source we have seven
products from the company Apple let's have the following question does the products names ends with the word Apple
so in order to do that we can create and again a new calculated field let's call it products ends with Apple so we're
going to use this time the function ends with and again here we have the product name and we are searching for the
product so does the product ends with the word Apple the calculation is valid again we have here aulon let's drag and
drop it in the view to check the results and now let's go and check the results I'm just going to going to make a little
bit wider to see okay this is the ends withth let's go and sort it so as I'm sorting we don't have any true all the
values are false and that means we don't have any products where it ends with the word Apple so with that we understand
that the word Apple exist only at the start of the product name or in the middle so as you can see those three
functions are really great to understand our data so now let's go and ask the followup question does the product name
contains the word Samsung anywhere so here we are searching for the product from the compy Samsung in order to do
that I think you already know it we're going to go and create a new calculated field we're going to call it products
contains Samsung we're going to use the function contains and we're going to search inside the field name product
name this time we are searching for the word Samsung so as you can see the
calculation is valid let's go and hit Okay so let's bring it to the view so now I'm going to just make it a little
bit bigger to see what you are talking about so here it's about the Samsung let's go so the results wow we can see
that we have a lot of products from the company Samsung so we have more products from Samsung than Apple in our data
source let's check the result again so here we have it over here Samsung Samsung over here then we have a lot of
products where it starts with the word Samsung again here in the middle but it never end ups with the Samsung wordss
okay guys so there's one more function that I usually use inside the calculations if I'm searching or
exploring the data and that is the case functions the upper and the lower case that we learned before for and that is
because Tableau is case sensitive in the search so we have to pay attention how we are writing the search term so in
order to now overcome this problem we're going to use the case functions let me show you an example so now we're going
to ask the question does the product name contains anywhere the word black let's go and create a new calculated
field as usual we're going to call it products black and this time we're going to use as well the contains so the
string the product name and we are searching for the word black so that's it let's hit okay and we have it as a
new dimension let's check the result as usual I'm just going to make it a little bit wider to see the results so now we
have a lot of falses and we have as well a lot of true so there is like a lot of products that has the word black so as
you can see over here we have here black we have over here as well the word black at the end and so on so there's like a
lot of products with the word black so the case here is the capitalized of only the character B let's go and change the
case in the search term so we're going to go and edit the calculations so now instead of the first character
capitalized we're going to have it as small so everything in the lower case let's go and hit apply so now as you can
see in the results we have only one product with the word black as lower case so Tableau is very sensitive with
the cases inside the search term and if we switch everything for example to uppercase black let's search so as you
can see all the products that we have is now false we don't have any products that contains the word black in
uppercase so Tableau is very sensitive about the cases inside your search term so now to fix this instead of going and
changing each time the case of the search term so lower case uppercase capitalize and so on we go to the
product name and we force it to be uppercase or lower case using the lower or upper so we're going to go over here
and add for example the lower you can use upper if you want we're going to have the same results so with that we
are first forcing the product name to be allower and then we're going to search for for the word black so with that I'm
covering all the scenarios inside my data source so let's go and hit okay so with this I will get all the products
that contains the word black doesn't care whether it is lowercase or uppercase we're going to get everything
so with that I'm sure that the string is containing the word black and we are not missing anything so that's why I include
the upper and lower case inside the calculations before I start searching so that's it for the first use case this is
how I usually use those three functions in order to explore and learn the content of my new data source let's go
now to the Second Use case where we're going to use those three functions in order to offer new filters to the users
so for example let's create a filter for the companies inside the product's name so let's go and create a new calculated
field we're going to call it companies and this time going to be a little bit more complicated than before but we're
going to do it step by step so we are searching first for the company Apple so we're going to have contains product
name and the search ter I'm going to P up lowercase but we have as well to lowercase the product name right so
lower and we're going to have it like this so this is the first one I'm just going to copy it and paste for the next
company we're going to have Samsung and then we're going to have Microsoft soft so we are searching for those three
companies and that's it so now we're going to have those three companies but as you know the output of the contains
is always like true and false but I would like to have a value in my filter called Samsung Apple Microsoft in order
to do that we're going to use the logical operations FL statements don't worry about it we're going to have a
dedicated tutorial for that later but we have to use it now so now just follow me we can use it to evaluate those
conditions so it starts with f for the first one so if contains the product name Apple what can happen so then I
would like to see the value apple and then if it's not true then go to the next one else F then we're going to
evaluate this condition if it's true then it's going to be Samsung then if it's false of course we're going to use
another else F we going to evaluate this one and then the output if it's true going to be Microsoft so that's it if
doesn't fulfill any of those conditions we're going to have the else let's say unknown so that's it we're going to end
it don't worry again about those Logics we're going to talk about it later so with that I'm going to get values I'm
going to get those three values instead of true and false and we are evaluating creating those conditions let's go and
hit okay so as you can see now we have New Dimensions the data type is not poon not true and false and that's because
the output of the calculation now going to be string values Let's Go and show it as a filter and now we can have those
values as you can see apple Microsoft Samsung and unknown I'm going to add it as well to the view to see the results
so let's go and grab it over here so now the users can go and start filtering the data based on the companies so let's
remove everything and start with Apple so with that going to get all the products with the word Apple inside it
or we have Microsoft so now we can see those products are from Microsoft the same goes for Samsung so with that we
are filtering based on the companies and we use the product name as basics for that and the unknown I think going to be
a lot of values unknown you can go like step by step adding more companies to our filters but now I just show you an
example for that so this is exactly the power of the calculated fields in Tableau we introduced new informations
based on the functions so this is all for this use case how to create filters based on those three
functions all right so now we're going to focus on the second group of search functions in Tableau we have the two
functions find and find inth here we are answering the question where do I find my search term so we are searching for
the position number of a search term so this time we are not getting true and false we are getting the position number
so let's understand why do we need this all right so now let's quickly understand the differences between find
and find inth well in find we are returning the position number of the first occurrence in the find inth we are
returning the position number of specific occurrence so for example let's say that we want to search for the
position number of the dash inside this string so the result going to be six because the first occurrence going to be
at this position but in the other hand we can use the function find inth for the same text and for the same search so
we are searching for the dash but we are asking now the position of the second occurrence so the first occurrence going
to be ignored we're going to get the position of the second occurrence and that's going to be 10 so this is the
main differences between those two functions in find we are searching for the first occurrence always but in F in
we can specify which occurrence we are searching for so let's go more in details about the function find all
right so now we going to have this example and as you know that each character in the string has a position
so C has the position number one and the character five has at the position number 14 the Syntax for find in Tableau
is as well very simple so it starts with the keyword find and here we have three argument the last one is optional so
string is the text where we going to search inside it the substring is what we are searching for and here the start
position of the search so as I said it is optional the output going to be a number so for example let's say that we
want to know the position of the dash inside this text so how this works it's really easy it starts from the left side
always and since we didn't specify anything for the starting position it's going to start from the first character
so table going to start searching okay in the first character we don't find it so the dash we can find it at the
position number six so the output going to be at the position number six all right so now let's take another example
where we can specify the start position for the search for Tableau so we're going to have the same thing again but
we're going to say this time start from the position number seven okay so what going to happen we're going to start
searching from here and table blue going to start from left to right so we're going to find it over here at the
position number 10 so the result going to be at the output 10 instead of six because we start searching from this
position all right so that's all for the function find let's move to the next one we have the find an e we're going to
work with the same example the syntax going to be a little bit different so it starts with the keyword find e the
string value where we're going to search inside it we're going to specify what we are searching for but this time we're
going to specify the occurrence so here we have to tell Tableau which occurrence we are interested in let's take an
example we have the following question find the position number of the dash inside this string but we are interested
in the second occurrence so how this going to work we're going to start searching from left to right as usual
here we cannot specify the start position of the search so we don't have this option over here it's going to
always start from the first one so as we are searching from the left to the right we have the first occurrence of this
character so we have it at the position position number six so here the output will not be the position number six
because we told Tableau we are interested in the second occurrence not the first one so Tableau going to go and
keep searching for the dash in the string so we're going to find it at the position number 10 so here is the second
occurrence of the dash inside our text so this is exactly what you are looking for the output going to be the position
number 10 so that say this is how this function work we're going to search for specific occurrence in the function find
we're going to get all is the first occurrence but there we can specify where to start search so now let's go in
Tableau and start practicing all right so now we're going to have the following example we're
going to start with the small data source let's go to the customers and I would like to get their first name and
as well the phones so now the task is to extract the country code from the phone and to put it in extra field so we are
interested in those informations the plus 33 plus 1 plus 49 and so on so as before we can use the function LIF in
order to extract the informations from the left side in the text so let's go and create that so we're going to go and
create a new calculated field let's call it phone country
code and we're going to use the function left we have to specify the string so it's going to be the phone and now the
next one we have to specify the number of characters that we want to extract and here exactly where the problem comes
so sometimes it's going to be like three characters and sometimes going to be two characters so let's go for example with
the three and let's hit okay we have it over here new dimension let's just bring it to the view and here we can find
exactly the issue right so the first one is fine the third one as well fine but for those countries it's not working we
have the dash inside it which is not really correct and now in order to fix this we're going to use the magic of the
function find so if you check over here we want always the numbers before the dashes right so we can search for the
position number of the dash and then we can include it in the left function so let me show you what I mean we're going
to go and create a new calculated field we're going to call it phone find Dash so now we're going to go and find the
position number of the dash so as we learned it start with find we have to specify where we're going to search so
we are searching in fonts what we are searching for right we're going to have the dash here and that's it we are not
interested in the start position so we going to start from the first character so that's it as you can see the
calculation is valid let's hit okay and since the output can be number we're going to get it at a continuous measure
so let's drag and drop it over here and see the results so the position number of Dash inside the first phone is four
the second one three then 4 four three everything is fine so now the next step what we're going to do we're going to
bring those two calculations the leftt and find in one calculation so I'm going to go and copy the syntax from the
phones find Dash and just copy it from here and go back to the first calculation about the country code so
let's go over here edit it and now instead of having this three as a static we're going to have it as a variable
using the F function so let's just add it over here so now how tblo going to execute this calculation it going to
start with the first function find so it's going to first find the position number of the dash inside the fonts and
then afterward we're going to go to the function left outside we're going to now cut everything after this position
number all right so now let's go and check the results at the string as you can see we are almost there so we have
the Plus 49 Dash plus one dash plus 33 Dash so the dashes are everywhere and that's because we are cutting everything
after the dash position so that means we are always one step more than needed so in order to fix it it's really easy
we're going to go back to our calculation yeah we are getting here the position number which is correct but we
want to get one step back so in order to do it we're going to do minus one to go one step back let's hit okay all right
so with this we get exactly what we want right so plus 33 + 1 + 49 and with that we're going to get more dynamic in the
function leftt if we are using defined function so with that we can see how we can bring those functions together in
one calculations in order to achieve such great goals all right so now let's try out the second function that we have
the find nth so now let's say that we want to get the position number of the dash but in the second occurrence so
let's go and create a new calculated Fields we're going to start with the keyword find inth it needs three
arguments the first one going to be the text where we're going to search inside it's going to be the phone and then we
are searching for the dash and then the third one we're going to specify which occurrence we are
interested in so we are interested in the second one so that's it the calculation is valid let's click okay so
since the output is number we're going to get a new continuous measure let's bring it to the view over here so now
let's check the results for the first phone the second occurrence of the dash going to be at the position number eight
which is correct and as you can see the find is number four because the first Occurrence at the position number four
for the second one it's going to be the number seven which is as well correct so now let's go and start changing those
occurrences let's go and edit it again I would like to get now the third occurrence so as you can see we have a
third Dash over here so let's change it to three and just apply you can see now we are getting the position number 12
for the last Dash in the phone number so with that we are getting the third occurrence of the dash inside our text
but now if we go and switch it to one what can happen we going to get exactly the same result as find because find
going to always bring the first occurrence so here we are saying I'm interested in the first occurrence all
right guys so that's it for those two functions find and find nth they are really useful to get the position number
of specific substring and I usually use them in another calculation so they are like supporting another function all
right so with us we have learned how to search for specific patterns in our text in Tableau using Tableau calculations
next we're going to start talking about about another group on how to combine and split the data in
Tableau okay so now we're going to learn how to combine and split the text in Tableau using the concatenation operator
the plus and the split function but as usual let's understand the concept behind them then we going to practice in
Tableau let's go all right so now we're going to talk about the concatenations in Tableau it's
very simple we use for that the plus oper in order to combine multiple text into
one text for example in our database we could have the following scenario where we have the first name and the last name
separated from each others using different fields so we would like to have only one field called the full name
so for example in order to do that we can use the plus operator in order to combine the first name Michael with the
last name Scott and at the end result we're going to get the full name Michael Scotts but now if you check the full
name we would like to have always a separation between the first name and the last name in the output inside the
full name so we usually use a space between them so we're going to do the same we're just going to add one plus
operator so we have Michael space Scott so between Michael and space we're going to have the plops operator and between
space and last name we're going to have as well another plus operator so the output going to be Michael space Scott
so as you can see with the plus operator we can structure anything we want by combining multiple string values
together using the plus so that's it this is really easy let's go back to and start
practicing all right so now we're going to go to the small data source over here and we go to our customers we would like
to have the first name and the last name in The View and as you can see those informations are separated in two
different fields so the task says Now to create only one field for the customer name the full name instead of having two
in order to do that as usual we're going to go and create new calculated Fields we're going to call it full name now we
need the first part the first name and then after that we're going to have the plus operator then we want to have a
separator between them as an empty space so we're going to have it like this and then plus operator the last part going
to be the last name so let's take the last name and put it over here so that's it it's important that the calculation
is valid so everything is fine let's hit okay so now as you can see in the data bin we have a new calculated field a new
dimension called full name let's check the values we're going to drag it over here on the rows and as you can see now
we have a very nice full name George Pips join steel and so on it's really simple right so now if you change your
mind you would like to have like a dash between those names what we're going to do we're going to go and edit it then
instead of having the white space over here in the middle we're going to have the dash so that's it let's hit apply
and now we can see in the full name that the first name and the last name are separated with a dash so it's really
symbolistic now a quick task the task says to combine the category and the product using the following rule as
usual you can pause the video in order to complete the tasks and once you are done you can resume it all right so now
let's check the solution it's very simple we're going to go to the product let's first see the row data so we have
the category and the product name and now we're going to go and create new calculated field so we're going to call
it full product name so the rule starts with the category then we have our plus operator after that the separator going
to be the double point but after the double point we have a white space so I'm just going to add it over here then
we have plus and we're going to have the product name let's check the the results the calculation is valid let's click
okay and here we have our new dimension let's just drag and drop it over here and check the results just going to make
it little bit bigger so we can see the results from here and here as well so as you can see our product name now starts
with the category double point then the product name and that's it this is how you can work with the concatenations in
Tableau it's very simple right so now we're going to learn the exact opposite so we're going to learn now how to split
one field to multiple Fields using splits all right so now we're going to talk
about the split function in Tableau it's very important function and a lot of people get confused about it but I think
it's simple so let's check this example we have here one field with a lot of informations so we have here the product
name the product ID and the product code all in one field and in many situation in the analyzis and the visualizations I
would like to split those informations into three Fields so instead of having one field I would like to have it in
three Fields so in order to do this we can use the split function and before we we learn that we can do that with the
left right and mid but the split function is easier in such a situation so we want to split this field into the
product name the product ID and the product code and in Tableau we have the following syntax in order to do it so we
have split and it needs three arguments the first one is the string the text that we want to split it so now let's go
and check the syntax in Tableau it starts with the keyword split and it need three arguments the first one going
to be the string or the field that you want to split the second one going to be the delimiter and then the last one the
token number the output going to be a string value so now let's take an example I would like to split this text
and the the limiter going to be the dash and I would like to have the token number one so here tblo needs from you
two informations the delimiter and the token number so the delimiter is the separator between words so for example
we have a separator between Canon and the ID using the dash and we have another separator between the ID and the
code so those dashes are the delimiter that splits my text so table here once understand from you how the words are
separated inside the text now let's move to the next information that is needed the token number here as well tblo wants
to understand which part of informations you are interested in is it the first part the second part or the last part so
here we have like an ID or token for each piece of information so the first one going to has the token number one
the second one we have token number two and the last one is the token number three in this example we said I'm
interested in the token number one that means I'm interested in the product name so the output going to be Canon and of
course if you are interested in the product ID in the middle we could say okay I'm interested in the token number
two so if you specify it like this you will get the product ID and if you are interested of course in the last one in
the product code you can specify the token number three in order to get the product code so as you can see once you
understand it it's really easy we just need two informations what is the separator between wordss and which token
number you are interested in so now let's go back to Tableau and start practicing all right everyone so there
are three ways on how to split your data inside Tau the first one is by creating new calculated field the second one is
automatic split the third is customized split so we're going to start with the first one on how to split your data
using new calculated field we're going to take the following example we're going to stay with the small data source
let's go to the customers and grab the phones over here and the phone numbers has a structure so we have a country
code area code and the phone number itself so now we would like to split those three informations into three new
Fields okay so let's see how we can do that so we're going to go as usual and create a new calculated field for the
first part for phone country code so we're going to start with a split keyword and it need three arguments the
first one going to be the string that we want to manipulate so it's going to be the phone number I'm going to add it
like this then the delimiter the delimeter here is the dash so as you can see those stuff are splitted with the
dash so let's just add it over here then Tableau needs from me a token number so the first one going to be the token
number one then two 3 four so we have four sections and we are interested in the first token number so the first one
so let's add one and that's it as you can see the calculation is valid let's go and hit okay so now we can see that
on our datab ban in the data source we have our new field the country code let's go and grab it to the view and
check the result and with that we are extracting the first token the first part of the phone and with that we have
have our country code everything is perfect so now the next step we would like to go and extract the area code so
the token number two so now we're going to go and create a new calculated field but first I would like to take the old
code because we want only to adjust the token number because everything else can to stay the same so let's go and create
a new one we're going to call it phone area code and then we're going to put our code over here the same stuff going
to stay the phone and as well the dash as separator then we want to change only the token number two so we are speaking
about about the second part so let's go and hit okay and check the results we have here again our new field so drag
and drop it on The View and as you can see now we are getting we are splitting yeah the second part so we have here 555
as well over here so with that we got the third part from our phone we have now the country code and as well the
area code and now next we have the following task for you create a new field in the data source to extract the
phone number part without the country and the area codes now you can pause the video in order to complete the task and
once you are done resume it all right so now we're going to go and create a new calculated field we're going to call it
phone number and we're going to have the same script so we have split phone Dash but
this time we are interested in both token 3 and token four so how we can do that in Tableau we can add only one
token at a time so in order to do that we're going to go and change this to three and since we need both of the
informations in one field we're going to use the plus operator so what we're going to do we're going to go over here
Plus and then we going to add the same code over here but this time for the token number four so with that we are
getting both of the tokens in one field so the calculation is valid let's hit okay and as usual we got a new field in
our data source so let's check the result over here we can see that now we have the phone numbers in this field so
now as you can see the first one is 1 2 3 4 5 6 7 and we have it as well over here so we have as well the same phone
number but you might say you know what we are missing the dashes right so we can go and add them in our calcul ated
field so let's go and edit it and we just can add new plus operator and between them we're going to have the
dash right so as you can see the calculation is valid let's go and hit okay and with that we got exactly the
same structure from the phone so that's it for the first method on how to split your data using new calculated field you
can see from one field we have extracted three new Fields so now let's go to the second method where we can split the
data using automatic split all right so now let's see how we can do that we're gonna stay with the small data source
this time we need the URL so let's take the product image from here drag and drop it in the view and we know that in
the URL there is a lot of informations and as well we can use the splitter to split the data so now instead of
creating manually those calculated Fields there is really nice feature in Tableau where we can split the data
automatically so in order to do that we're going to go to our field the product name right click on it and here
we have the option of transform so we are manipulating the data and here we have two options the split and the
custom split so the split is the automatic way wow we got now a lot of new fields in our data source and that's
because Tableau automatically split the data and as well understood the content of the data so you can see here we have
the product image domain then fragment path query schema all those informations are part of the structure of an URL so
now let's go and check those informations we're going to take for example the domain drag and drop it on
The View and as you can see TBL got it correctly right we got now only the domain information from the whole URL L
which is really nice we can take as well the scheme over here and we have the protocols from the start so as you can
see TBL get it really correctly some of those fields going to be empty I think because we don't have it as a part in
our URL so with the TBL did the automatic split and if you would like to learn how Tableau did split it you can
find it as well inside this field because it is calculated field so let's see how Tableau did split the domain
right click on it and go to edit so as we can see here tblo is using two splits in order to get the domain informations
the first split is this one so Tableau is splitting the protocol from the whole URL so the separator going to be the
double point and the two forward slashes and we are taking the token to so we are getting the second part so once we get
the second part going to be really easy the separator as you can see is the forward slash so we want to split now
with the forward slash and we would like to get only the first Parts it's really easy you can go and try it yourself so
that's it let's click okay so with that Tableau is in some cases not in all cases is smart enough to split your data
into new Fields automatically so that's it for this method the automatic split next we're going to see the customized
split okay so we're going to stay with the small data source and we're going to go to the customers again here we want
to split the phones using the custom split so let's bring it to the few and then in order to customize the split
we're going to go to the data Bane on the field that you want to manipulate right click on it and then here we have
transform before we have the automatic split this time we are interested in the custom split so let's go inside and here
we're going to get a new in order to customize the split and it's like the calculations the syntax Tableau needs
from us two informations first the separator second what do you want exactly to get so the token numbers the
first one the separator or the delator in this example going to be the dash all those informations are split it with the
dashes so let's go and enter a dash the second information we have the following options so split off and here we have
three options do you want the first part the last part or everything and here it depends on what do you want if you want
to split everything you want for each piece of information new Fields you're going to go with the option all so now
let's say that you are interested only in two informations the country code and the area code the rest you are not
interested to have it in the data source so in order to get the first two parts we're going to go over here and select
first and here you can specify two so we are interested in the first two columns and the first two informations from the
left side but now let's say that you are interested in the last two parts so you would like to get two fields for the
last two informations so what you're going to do you're going to go over here and select last and as well select two
so with that you are specifying for Tableau what do you want exactly to get as a results how many fields from the
start from the end or everything so in this example I'm interested to get everything so we're going to go with the
option all and that's it let's go and hit okay so once we do that tblo going to go and create a lot of new Fields so
tblo did manage to split the phone number into four parts so let's go and check those informations drag and drop
it over here in the rows and as you can see the first part going to be the code the second one going to be the area code
and then tblo split those two informations into two Fields so here it's not like the second method where we
are blindly automatically splitting everything here we are specifying for Tableau few rules and then Tableau going
to go and as well automatically split the data to get better quality in the fields and of course if you are
interested on how table did the split we can always go to the data Bane all those informations are calculated fields and
we can go inside them and check the code so we can go over here and do edit and as you can see the delimeter is the Dash
and Tate it as a first token in order to get the country code all right guys so that's it those are the three methods on
how to split the data inside your data source they are really useful in order to generate new informations and split
those complex structures inside the original data source into new structure for the analyzis and the visualizations
all right everyone so that's it this is how you combine and split the text in Tableau next we're going to start
talking about the last string function in Tableau the replace okay so now we're going to learn about
the last use case for the string function how to replace specific substring with another substring using
the replace function as usual let's understand the concept behind it then we're going to practice in Tableau let's
go okay the replace function in Tableau it's very simple it going to replace one substring with another one so for
example we're going to have the following address and as you can see in the middle we have the abbreviation of
the street so St dot so I would like to have a normal wording of this so instead of having the abbreviations I would like
to have the complete word straight and we can do that using the replace function in Tableau let's check now the
syntax in Tableau so it starts with the replace keyword and it needs three arguments the first one is going to be
the string the original text that you want to manipulate the second one is the substring the one that you want to
replace the third one is the replacement so it's really clear this going to be the new substring the new word so here
the output going to be as well a string value so in order to solve this task in this example what we're going to do
we're going to use replace then our text then the old one going to be the St dots the abbreviation this is the old
substring and the new one going to be the street the complete word so how this going to work Tableau has first to
search for the substring that we want to replace so it's going to search the whole text in order to find the
substring and in this example of course we're going to find it over here in the middle and the next step is that tblo
going to go and start replacing this word with the replacement so tblo going to take the SD dots and going to replace
it with the complete word of street so at the end we're going to get Louis Street pariso so as you can see it's
really simple we are replacing the old value with a new value so at the end the string going to look like this so we're
going to have Street complete instead of St dot so now of course the question is what going to happen in the output and
the results if we don't find anything so for example we have this address and Paris we are searching for for the SD
dots but we don't have it inside the text so here tblo going to return the original text without changing anything
so nothing going to happen so that's it it's really simple right we're going to go back now to Tableau in order to
practice the replace function okay so now we're going to go and practice with the small data source
let's go to the customers and we're going to manipulate the phone number again for the customers now as you can
see the structure in the phone number starts always with the Plus for the prefix for The Intern ational call so
now we have the requirement to replace the plus with 0 0 as a prefix and now in order to do that we're going to use the
replace function in taow in order to do the switch the replacement so let's go and create a new calculated field we're
going to call it phone replace so it start with the keyword replace we need now the field that we want to manipulate
it's going to be the phone number so we have it over here and now we need to specify for Tableau the substring the
old value so the old value is the plus sign and now we have to specify for Tableau
the replacement the new value the new value going to be 0 0 so that's it Tableau has the calculation as valid so
let's go and hit okay and with that as usual we created a new calculated field in our data pane let's go and check the
results so drag and drop on the rows and now we can see in the result instead of having the plus sign we have everywhere
0 0 and with that we have fulfilled the requirements and now we might get another requirement where they say you
know what I don't want those minuses inside the phone number so it would be nice to remove them and now in order to
do that we're going to do the same thing we're going to use the replace function the old value going to be the dash and
the new value going to be nothing let's see how we can do that so now let's go and edit our calculated fields we just
want to add new replace function so let's go edit over here and here it doesn't matter whether we want to
replace first the Plus or the dash so now in order to do that I usually do it like this if I'm doing nested so replace
so what we are replacing the phone number so instead of having the dash we're going to have nothing so we are
replacing the old value the dash with nothing so now in order to have it nested I would like to take this part
the first one and put it instead of the phone and with that we are having nested calculations first we're going to
replace the plus sign second we're going to replace the dash sign so let's take it to the first row and with us table is
saying the calculation is valid let's go and hit okay and as you can see now in the results we don't have any dashes or
plus sign so we have a whole number without any special CS so with that we solved the second requirement so it's
easy right it's not that hard and we can do a lot of things with the replace function it's great function to
manipulate the string values in Tableau so now for you we have the following task in the big data source in the
product name we would like to replace the hash symol with a number as abbreviation and now you can pause the
video in order to complete the task and once you are done you can resume it all right so we're going to go to the big
data source this time and we're going to go to the product and we need the product name let's drag and drop it on
The View and check all values so now we're going to make it a little bit bigger in order to see more values so
inside the data we have some hashes like here for example at the start and we want to replace it with INR point so in
order to do that we're going to go and create a new calculated field so let's go in the arrow over here create a new
calculated fields we can call it product replace so we're going to start with the replace keywords and then we need the
string that we want to manipulate it's going to be the product name the next we want want the old value so it is the
hash and then the replacement is going to be the number as abbreviation so in our point so that's it as you can see
the calculation is valid let's go and hit okay so with us we have a new dimension new calculated field in our
data pane let's track and drop it in the view and check the values and we see over here instead of the hash we have
the abbreviation of the number so with that we have learned that the replace function is very simple and as well very
important in many use cases I use it a lot once I want to to clean up the data so sometimes we get bad quality from the
sources and there will be a lot of like special characters I can use always replace to clean up the data and to
remove those special characters with something more meaningful in the visualization like we did in this
example we replace those special characters with something more meaningful or I use it a lot as well to
change the format of something so for example we here have the phone numbers and we Chang the format from having the
dashes to something else like without dashes and as well instead of the plus we have the 0 so with this we are not
cleaning up here the phone we are changing the format and how we are presenting the phone's in the
visualizations so on the left side we have the plus and dash on the right side we don't have them so we usually use the
replace function in order to change the structure the format of one field it is just amazing and very important tool in
Tableau all right everyone so that's all for the replace function and with that we have covered all the use cases in the
string functions we have learned around 16 string functions to manipulate transform and clean up the text values
in Tableau next we're going to jump to another group of functions in Tableau the date
functions all right so now we're going to talk about the third group of functions under the category roow level
calculations the date functions and there are three use cases for the date functions in Tableau the
first one is to extract specific date part from our date like day year and month and for that we have six different
functions in Tableau the date part date name date trunk day month year the Second Use case is to add and subtract
date values in our data source so here we have two functions date ad and date div the last use case is to find and fit
the current datee and time and here we have two functions today and now so those date functions going to give us a
tool to manipulate and transfer confirm the date values in Tableau we're going to start now with the first use case how
to extract specific part from the dates using those functions and as usual it's really important to understand the
concept behind them then we can practice in Tableau so let's go all right everyone so in tblo there
are two ways on how to manipulate transform the fields with the data type date the first one is to do it globally
in the data source for all worksheets all workbooks the other way is to to do it locally only in one worksheet only in
one view so for the first one if you are manipulating the date and you want to reuse it in different work sheets so in
order to do that we can go and create a new calculated Fields using the date functions but now in the other hand if
the transformation is not that important you don't want to reuse it you don't want to use it in any other worksheets
you need it only once in one view then instead of creating new calculated field in the data source and using the date
functions we could just simply go and change the date format directly in the view which is way easier and quicker
than creating new calculated Fields so as you can see there is like two methods in how to manipulate and transform the
dates in Tableau either using the date functions or changing the date formats and now if you ask me which method
should I use you have always to ask the following question is the transformation going to be needed in different
worksheets then yes go and create a new calculated field using the date function but if the transformation is only needed
for one view then you have to change the date format directly in the visualization so now we're going to go
and focus on the date functions since we are talking about the calculations and at the end we're going to talk about the
date formats all right everyone so in Tableau we got bunch of date functions that all
has the same goal to extract date parts from specific fields and we can use them to generat such a view so as we can see
over here we have the years we have the months the quarters all all those informations comes only from one field
the order date and we can build from all those new information that we extracted a lot of analyzes and insights about our
data like the one that we are seeing here the heat M so now let's go first understand those functions and then we
come back to Tableau all right guys so now we're going to talk about the first date function in Tableau the date part
we can use it in order to extract a piece of informations from our date fields so for example we have the
following date it is structured from year month and the day we can use date part to extract one piece of information
like for example the year so if you are extracting the year the output going to be 2025 but if you are extracting the
months we're going to get the August 8 and if you are extracting the day we're going to get 20 and here it's very
important to understand that if you are using the date part the output going to be in number so the year going to be in
Number the month will not be August it's going to be a number so it's going to be eight same thing for the day so you will
get 20 as a number so let's see the syntax in Tableau it's very simple so it starts with the date part then Tableau
needs from you two informations the date part here table can to ask you which piece of informations you are interested
in do you would like to have the year a month a day and so on and the second part the second argument going to be the
date field that we want to manipulate and the output the result of this function going to be a number so now
let's take an example we're going to take date part now we are interested in the information of day so we would like
to extract the day information then our date going to be looks like this the output going to be 20 if we want the
month then we have to specify a month at the date part and if we do it on these dates we will get the month's eight the
same thing if you want to get the year so here we specify the year at the start then our date the output going to be
2025 so that's it for the date part this is one method on how to extract a date part from specific date let's move to
the next one we have the date name let's see the syntax in Tableau it's exactly the same so it start with the date name
as a keyword then Tableau needs from you to informations which part of the date you are interested in and give me the
field that you want to manipulate but this time the output going to be a string value so let's take an example
let's say that we are interested in the year part from our date so the output going to be again 2025 but the value
going to be in the data type string but this time if you say you know what I'm interested in the month so you specify a
month as a date part this time Tableau going to answer answer was August instead of 8 because the output here is
string so you will got the name of the month as an output and now the next one if you say I'm interested in the day so
if you specify in the date part a day instead of month you will get as well a 20 but as a string value so that's it
for the date name it's very similar to the date part right but the only difference is that there you are getting
a number but with the date name you are getting a string value so this is another method on how to extract the
date parts from a date let's move now to another set of functions that could be used as well to achieve the same goal in
order to extract date parts from a date so this time we have three quick functions in order to extract quickly
the date part from a date they are my favorite I tend always to use them in compared to the other two because they
are really easy to write so the syntax in table going to look like this the first function it accept only one
argument it date same thing for the month and for the year the output going to be a number so it's like the date
part function fun so for example if I'm interested in the day I can do it like this I use the function day then the
date that we want to manipulate then the output going to be 20 as you can see compared to the others it's really
quickly to create right so here we don't have to specify for Tableau in the syntax the date part because the
function name called day the same thing for the month if I'm interested only in the month I can just use the function
month in order to extract the August or eight and for the last one if I'm interested in the year I can use the
function here so as you can see they are really easy and quick to create if you compare it to the other two so as you
can see they are really easy let's move on to the next one this going to be slightly different than all others we
have the date trunk okay so some facts about this function it is a little bit complicated a lot of people don't know
about it but I tend to use it a lot it's very useful function but it is not that famous think about the date trunk like
rounding function in numbers so if you have a lot of details in one date you can round the date to specific level so
what this means if we have the the following date time so we have here like hierarchy right we have a year month day
hour minute and seconds so we are seeing in this data a lot of informations and sometimes you are not interested in a
lot of details like seeing the seconds minutes and hours you like to see only at the month level so what we can do we
can use the data trunk in order to round those numbers let's check first the syntaxing Tableau it's very similar to
the others it looks like this date Tran then you specify the date part and then the date that you want to manipulate the
output this time it will not be a number or a string it's going to be date and time okay the best way to understand
this function is to have some examples so let's say that we specified at the date part a day and then we have our
time and day over here then what going to happen what you are telling to dos the time informations are really
detailed for me and I'm interested only to see this piece of information at the day level so I'm interested only at the
day informations I'm not interested in the time so what can happen in the output is that table going to return the
same informations but this time it's going to reset everything at a time so you can see we are maintaining all the
informations about the year month and day but anything below the day it's going to be reseted to zeros so as I
said it's like rounding numbers right you are rounding the information to specific level so now let's move to the
next level where you say you know what I'm interested at the month level so you specify at the date part a month month
then we're going to have the same information over here so what you are seeing to Tableau is that I'm not
interested in the details in the day I would like to see my information at the month level so with us we're going to
get the first of August in 2025 now we're going to go one more step where we're going to say we are interested
only at the year level so if you go and specify at the date part the year what going to happen you tell Tableau I'm not
interested in anything else I'm just interested in the year so I think you already got it what going to happen
everything going to be reseted so anything below the year so the month the day the time can to be reseted to one
over here then zeros at the times and we're going to have only the value 2025 so that's it for this function it is
very useful in many calculations to use the date trunk so now let's go and compare all
those functions side by side we have here as a rows the date parts so we have year quarter month day and so on and
then we have here in the column those different functions I don't include here the day month and year functions because
it's very similar to the date part so here the first things to understand is that the date part output going to be a
number date name output going to be string date rank output going to be date and time and we're going to work with
the same example so we have the following information about the date and time so now let's go and see the output
of those functions those different levels in the date parts so now let's start with the first level the year if
you say I would like to have the date part of this information you will get 2025 the same thing for the date time
but this time for the date trun you're going to reset everything below the year so you will get the 1 of January 2025 so
let's move to the next level we have the quarter the date part quarter of this date it's going to be three the same for
the date name it's going to be three but this time it's interesting right because in date time we don't have usually the
quarter informations so this time it's going to reset to the first month of the quarter it's going to be the month
number seven so let's to the next one we are at the month level so if you use the date part you will get eight if you use
the date name you will get the full name of the month August and if you use the date trunk you're going to reset
everything below the month and you will get the first day of August moving on to the date if you use the date part you
will get a number 20 the date name you will get a string value 20 and this time at the date trun you are resetting the
whole time moving on to the next one we have alternative for the day and here we're going to get the weekday the
number of day in inside the week so here we're going to get the number four from the date part because it is Wednesday so
if you are using the date name you will get the full name of the day Wednesday and for the day trunk nothing going to
change we just going to reset the time as well and now if we are moving in details if you extract the hour for the
date part and date n you will get nine and here as you can see we are resetting now only the minute and the second
because you are not interested in it so moving on to the next one minute we will get 45 and date part date name and here
we are resetting only this seconds as you can see only seconds are zeros now let's move to the lowest level in the
hierarchy we have the second so we're going to get 21 21 and the output going to be exactly the same value in the
input so with that you can see the big picture using those three functions and what are the main differences between
them and what you going to expect if you are using them so now let's go back to Tableau and start practicing those
functions okay so now we're going to go to our big data source let's go to the orders and we will be manipulating the
order date so let's take it to the view table going to convert it immediately to a year so we are not seeing the original
data we are seeing only the year part from the order dates because Tableau wants always to make visualizations and
of course it makes sense to have the years instead of all dates inside our data source but in order now to show all
the data like in our data source we're going to go over here and switch it back to the exact date so let's click on it
and T going to convert it to continuous but I would like to see all values so we're going to switch it to discrete so
now as you can see we get all the values exactly like the source system so we have round five years of data so now
we're going to go and practice by extracting the date Parts we're going to start with the year so let's go and
extract those years we're going to go and create a new calculated field let's call it order date year so here we have
a lot of ways in order to get this information we can use the date part the date name the date trunk or even the
year function all right so now we're going to start with a date part and as you can see it accept two argument but
the third one is optional here you can Define what is the start of the week but I usually leave it empty so the date
part that we want to extract now is the year then the date that we want to manipulate is the order date so that's
it and as we can see that the calculation is valid let's go and hit okay and as we learn the output of the
date part can to be a number that's why tblo going to create a new continuous measure but I would like in
visualizations to see is this distinct values of the years so I'm going to go and convert it to a dimension so now as
you can see it jumps to the dimensions and we have it now as a discrete Dimension let's bring into the view and
check the results as we can see now we have all the years exported extracted from the order dates so now let's go and
try the other methods let's replace the date part with a date name here it's very important to understand that the
data type going to change so here we have it as a number and if we switch it to data name we're going to get it as a
string so let's go and change our calculation instead of date Parts I'm going to have date name so let's hit
apply and as you can see immediately the data type going to switch to string value but in the view we're going to get
exactly the same result right so nothing going to change only the data type now we're going to move to the easiest one
the quickest one is to use the year function so instead of the whole thing over here we're going to write year and
we don't have to specify the date part that's why we are getting an error we need only our date that's we want to
modify so that's it let's hit apply as well nothing going to change in the view but the data tape going to switch to
number because the output of these functions is a number so now you might ask me okay which one should I use I
recommend you always to use the quick one of course but what is more important is the data type the data type number is
always faster than the data type string the data type string is the worst it is the slowest data type from all others so
we always try to avoid the data type string in the visualizations not to have bad performance in our views so if you
are thinking about those three functions I would always avoid the date name so now we are left with two functions date
part and the quick function I would always go with the quick one right because it's easier to write so I would
prefer in this situation to have year order date like I'm showing it in the view but of course in a lot of situation
you want to show for example the day name or the month name so it depends really in the requirement but if you can
avoid it don't use date name so that's it this is my recommendations to you and what I usually do so now let's close
this and extract another part from the dates we're going to have the quarter so here again we have the three options and
all three deliver the same information so I would go and create a new calculated field let's call it order
dates quarter and this time I'm going to use as well the quick one so quarter qu dates so that's it it's really simple
right let's hit okay and now we have again a new continuous measure I would like really Tableau here to create
immediately a dimension so I'm going to go and convert it again to dimension because I use it in the view as
Dimension let's check the results and we can see we have now the quarter number which is correct all right so now let's
go and extract another information from our dates we're going to get the month so let's go and create again new
calculated field we're going to call it order dates
month and now this time we can use month function and our field order dates it's very simple right so let's go and hit
okay and we're going to convert it again to dimension and bring it to the view so with that we
are extracting the month information from the order date so everything looks fine here we have September August and
that's it and here we are usually in this situation where the users would like to see the months as a full name so
instead of having the month number we would like to have the month's name which I really agree because it's easier
to read the month name than the number so in order now to change it we can to use the date name function so let's go
and change our calculation so let's go and the edit now instead of month I'm just going to remove it let's has the
date name then the part going to be month and then we have our order dates so let's hit okay and now of course what
happened we change the data type and as well the values inside this field so we are now getting the complete name of the
month so we have January February and so on so that's it this is how we can extract the different date parts from
our original field the date so now the question is how to use those new informations in our views all right so
now we're going to go and create a view from three informations category order date and sales using a heat map or
highlighted table so now the first thing that I would like to do is to remove the order date this is a lot of details we
don't need it in the view then we're going to have in the rows the year I'm going to leave it but I would take the
quarter to the columns and as well the month and of course what is missing now is to fill those gaps using a measure so
our measure going to be the sales so let's drag and drop it over here so now in order to convert it to a heat map we
have to add it as a colors so let's take the sales again and put it in the colors or you can hold control and drag it to
the colors we're going to get the same results now we are almost there I would like to have instead of text I would
like to have squares in order to get the heat map so with that we got a heat map we can change the colors if you want so
let's go to Colors edit colors and I would like to have it as blue so hit okay so with that we have created our
heat map using only one field the order dates so we have the years from the order date we have the month from the
order date and as well the quarter so as you can see those parts that we extract from the date are really useful to make
visualizations so now we can go and add the Final Touch in this View and that is by making abbreviations from the month
name as you can see here the February is really big for the S over here so we can make it shorter in order to do that we
can use the lift function so let's go to our calculated field and edit it and now before we're going to add left and then
at the end we're going to add three so I would like to get only three characters from each month let's go and hit okay
perfect now we have abbreviations for each month and the view look more professional there is last thing that we
have to add a to the last one it is the category we forgot about it so let's go to the categories and just drag it
before the year so with that we got really nicely those categories and we can see inside it how those categories
are developing over the time so with that we got a really nice heat map with all those informations from the dates
now we have in our data source a lot of new informations about the order date where we can use it like almost
everywhere now we have another very common use case for those new informations where we can use those date
Parts as a filter so let me show you what I mean let's go again to our orders and we're going to go to the month so
right click on it and show it as a filter the same thing we're going to do for the year so right click on it and as
well show it as a filter so now we can see those informations on the left side and The Logical order is very important
so first a year then a month and since the month has a lot of values let's go and switch it to a drop down with
multiple values so now using those filters the users can go and specify what is the scope for this view by
changing the values of the year and as well for the month so this is very common use case for the date Parts in
Tableau so that's it for those functions now let's move to the last one we have the data
trunk okay so now in order to see the effect of the date trunk let's go to the big data source and get all the order
dates to the view I will would like to see the exact date so let's switch it to exact date and again to discrete to see
the values all right so next we're going to take the sales to the view as well and with that you can see we are seeing
all the DAT all the information that we have ins theide the data source and we have a lot of details so now let's say
that I'm not interested in the days I would like to see one date for each month so we would like to have this date
at the month level in order to do that we're going to go and create a new calculated fields and we're going to use
the date trun so let's go and do that we're going to call it order date and then trun so the syntax going to be like
this date trun and it accepts two arguments the first one going to be the date part which level we want to see in
the view so we want to have the month so let's specify here month then the date that we want to manipulate which is the
order date so that's it and the calculation is valid let's go and hit okay and as you can see now on the left
side we got a new dimension with the the data type date and time so what we're going to do now we're going to go and
replace the order date with this new field so just put it on top of it and again here we have to do the same thing
so right click on it switch it to exact date and then again to the discret and now we have a new date field where
everything at the month level so we have always the first of the month so we have the first of January the first of
February and so on so as you can see now the list is shorter right because we have now one row for each month before
we had one row for each day so now I'm not interested in those zeros in the view I would like to get rid of them in
order to do that we can change the data type so let's go to our date trun and let's switch it from date and time to
date so let's go and do that so as you can see now we have a date filled and all the time is away so now let's say
that I would like to have a date only at the year level so I don't care about the days and the month I would like to have
one row for each year so in order to do that we're going to go and edit our calculated field and now simply we're
going to go and change the value from month to year so that's it let's go and hit apply and you're going to see over
here that we have now one row for each year so now we have a filled always at the year level and we got like around 5
years so as you can see with the date trunk we can control the level of the date field so let's say that we want to
switch it today so we're going to go and switch the year today and now with that we're going to get all the details we
have one row for each date and with that we have a lot of details so we are back like the original field order dates so
this is how we work with the date trank in Tableau okay so there's another way in order to visualize the effect of the
day trun so let me show you how to do it let's first close this thing here and then we're going to switch the order
date trunk to continuous field so let's go and do that and now let's go and flip everything so we're going to have the
order date and the columns and the sum of sales and the rows and instead of having bar let's have a line so now in
the visualizations we have a lot of marks so if you Mouse over on those informations you can see we have one
mark for each day and that's because we have defined in the order date trunk that we are at the day level and you can
see here on the details we have around 1,800 marks in this one view so now if you say this is a lot of details let's
switch it to month so let's go to our calculated field edit it and just move it over here on top so instead of day
we're going to have a month so let's go and hit apply so let me just close this from here and let's check the view we
have now for each month one Mark so we are at the month level and the marks are totally reduced yeah so we have only 60
instead of thousands of marks so with this we don't see a lot of details in the view we have one mark for only one
month so this is the power of the day trunk let's say that we want to go to the years and I think you know already
how many marks we're going to get we going to get only five marks so each point each Mark going to represent a
year so this is the power of the day trunk to control your view in which details we are talking about all right
so that's it for those functions they are really great in order to extract specific part from a date and as you can
see they are really useful for the visualizations so now we used a lot of calculated Fields as you can see on the
left side we have a lot of new dates in our data source which is globally that means if I go to any other worksheets or
even to any other workbook connected to my data source I'm going to see the exact fields that I created using the
calculated field and I can go immediately and start reusing them in my visualization which going to save a lot
of time by doing formatting and so on so that's it how to extract the dates Parts using calculated fields to be globally
next we're going to start talking about how to do it quickly locally for only one view by formatting the
field okay so now we're going to start from the scratch we're going to go to our big data source let's go to the
orders and get the original field of the order date to the The Columns and again let's take the sales to the rows now as
you can see Tableau always brings it as a year and that's because it wants to visual only small amount of data at the
start and then you decide on what you need so here we can go and manipulate the order date directly in the view by
changing the format instead of going and creating calculated Fields now in order to format the date we're going to click
on the dimension itself so right click on it and now we have here two important sections so the first section is a
discrete section where it's going to use use the function date part and the other section is a continuous section where
it's going to use the date trunk and here always on the right side as you can see we have those gray examples in order
to show you which format can to be presented in visualizations for example there's no difference between this year
and this year but here we have the quarter Q2 but here we have the quarter plus the year so you can see the formats
that's tblo going to use in the presentation in the view so now let's go and check the differences between this
month and this one so let's start with the first one let's click on month so now as you can see our field stays Blue
so it means it's discrete and we have those values January February March and so on so we have it as a text and if you
would like to know how tblo did create this you can go over here on the month double click on it and you can see the
format so Tableau is using date part month then the order dates so you can see the syntax that this Tableau is
using to quickly format your view so now let's go to the next one we're going to have the month as a continuous field so
right click on again and now we're going to have the month plus the year so let's go and click now you see that our field
is continuous and if you double click on it you can see that Tableau is using date trunk so now we see the years in
the axis and each Mark each point of those stuff are a month so as you can see it's very easy we are just clicking
around and we are changing the whole format of our dates so what I usually do I go and select different formats until
I'm convinced about the correct format that can to represent my data and there are as well a lot of different formats
so let me show you let's go to the order dates and as you can see we have yeah a year quarter month but here we have the
option of more you can see we have a week number a week day and you get more options if you go to the custom now here
you're going to get a list of all possible formats that we can use in order to change the structure of our
date the same thing of course for the continuous fill so if you go again to The Continuous you can see we have here
as well more so you click the custom and as well you can change the different format and of course any decision that
you are making now in the view it going to stay only in this view so if you switch to any other worksheets you will
not find what you have already formatted so this is the only disadvantage of making a lot of decisions in one sheet
then you will not have it in the next sheets and there is as well more options on how to format the fields for example
let's go to the order date right click on it and let's choose this month as a full name then I'm just going to switch
those columns with the rows now you can see that in the header we have the full name of the month but we can go and
change the format of those headers by just right click on it and then go to format and then on the left side we can
change the display format of the header so for example on this one on the dates if you click on it you will get
different options like here for example the abbreviation so once you click on it you can see now we have an abbreviations
of the month name or we can get the first letter of each month if we want really to make it small so we can go
over here and change it to first month with that we get get the first character of each month and of course those format
are not only for the month let's take for example the weekday so we're going to go over here then switch it to
weekday we have here the full text of the day so in order to make it aviations we're going to go on the left side again
and switch it to abbreviation and with that we're going to get a shortcut for the weekday so as you can see by just
clicking around we're going to change and manipulate the values of the dates inside our data source without writing
anything without writing any syntax or creating new calculated Fields so we can just do it quickly in one view but here
if you find yourself that you are repeating the same format over and over in different sheets I recommend you to
go and create a new calculated field for that to store it at the data source and use it once you need all right guys so
that's it for those functions and how to format the dates okay guys so with do we have learned how to extract specific
date part from our date field next we're going to talk about two functions date ad and date div
okay so now we're going to learn how to add and subtract dates in Tableau using the two functions date add and date div
but as usual let's understand the concept then we're going to practice all right so now we're going to
talk about the function date ad we can use it in order to do mathematical operations on our date field so for
example we can add three days to our dates or we can subtract for example two months from our dates so we can
manipulate our date by adding or subtracting specific intervals from our dates so now let's see the syntax in
Tableau and take some examples in order to understand it so it start with the date ad as a keyword and it needs three
arguments first the date part that we are interested to manipulate the interval is like how many days how many
months you want to add then we have the date fi itself that we want to change the output the result going to be a date
fi so for example let's say that we want to add three years to our date so we specify at the date part years then the
interval going to be three and then our date so what going to happen tblo going to go and add three years to our date
field so with that we are adding three years to this piece of information the year and the rest the months and the
days going to stay as it is so let's move on let's say that we want to add three months instead of three years so
what we're going to do we going to specify a month at the date part then three as an interval then our date as
well so what going to happen we can to change only this piece of information so instead of having August we're going to
have November so that we are changing only the month the rest going to stay as it is and now we're going to move to the
last one to the day we would like to add three days I think you already got it so what's going to happen we are going to
add three days so we're going to have the 23 instead of 20 and it's Chang only at the day level the rest going to stay
the same so with this you can see we can add different intervals to different date Parts in our date field and in our
examples we were working with positive numbers but in Tableau we can as well use the netive numbers so with that
we're going to subtract the intervals from the date so let's take an example let's say that we want to subtract 3
years from our date so we're going to have here the interval as a -3 so minus 3 and the output we will have instead of
the Year 2025 we will get 2022 of course the same thing we can do it on the day so we would like to subtract three days
from our date so instead of having the day 20 we're going to have 17 so as you can see we can use the date ad in order
to add new intervals but as well to subtract intervals it's very important function in Tableau in order to compare
things together like we can compare this year with the next year so we're going to go and add one year to our field and
with that we're going to get two Fields the field with the current year and the field with a next year we will see that
in next examples so that's it for the date ad let's move on to the date diff the date diff function in Tableau has a
very simple task and that is to subtract two different dates so for example let's say that we have two dates that order
date and the shipping date in our data source so let's say that you ordered something in this date 2025 in November
and you received your order in the next day in February so now if I ask you how long it took to ship your products to
your house you're going to subtract those two dates in order to give me the number and this is exactly what the date
diff does in Tableau so the syntax going to be looking like this date diff then we have three informations which date of
part you would like to subtract then we have the starting date in this example the order date and then the end date the
shipping date the output going to be always in number so as usual we're going to have examples in order to understand
it so here we're going to ask Tau how many years it took to deliver to ship this product so here we are interested
in how many years we are interested in the year part then the start date going to be the order date and the end date
going to be the shipping date if you do that in t you're going to get one so it took one year to ship the product so
here we are talking at the year level you will get one now let's go to the the next level let's say how many months
does it take to do the shipment so here we are specifying at the date part a month we have as well the same
informations for the start and the end date and this time you going to get three months so the answer going to be
it took three months to ship the product to the customers all right the next question going to be how many days it
take to ship the product to the customers and this time it's going to be 68 so now we are talking at the day
levels so the result going to be it took 68 days to ship the product from the order date to the shipping date so in
this situation it makes sense to use the date because we always want to understand how many days exactly it took
to send the product to the customers because if you have like a year you're going to think it tookes the whole year
to send the shipment so that's it this is how this function works it's very simple and very useful in the
visualizations so now let's go back to Tableau and start practicing those two functions all right so now let's go and
see how we can create that in Tableau we can at the big data source let's go to the orders and we can to manipulate the
order dates so let's bring into the view over here and we're going to show the exact date so we're going to go and
switch it to exact date to see all details and I would like to have it as discrete to see all the values inside
our data source so now it's really simple let's say that I would like to add one year to my order date in order
to do that we're going to go and create a new calculated field so we're going to call it order dates plus one year so
we're going to use the function date ads and it need three arguments ments the date part so we are adding one year so
the date part going to be a year the interval going to be one and the date that should be manipulated is the order
date it's very simple so as you can see that table says the calculation is valid let's hit okay and check the result so
as you can see we got a new field in our data source with the data type date and time let's check the results we're going
to grab it to the view but I would like to see as well the details so I would like to see the exact date and again we
have to switch it to discrete in order to see the results so let's switch it to this create and now as you can see we
have a date and time if you want to get rid of the time we can cast the field to date so in order to do that let's go to
our data pane so this is our field click on the icon of the data type and switch it from date and time to date so let's
do that and as you can see now the time did disappear and as a result we see that everything is plus one year so we
have here 2018 at the result 2019 so we can check other dates if we s this as descending we can see that we have the
value as 22 and here we have it as 2023 so that's it this is how we can create a new field with plus one year let's add
one month so now let's go and edit our new calculated field so right click edit and let's change as well the name from
year to month and now instead of the date part year we can have month so it's very easy to switch and if you select
apply so now we can see that we are adding one month to the data so if I sort it again to the old one you can see
here here we have January and now we have it as February we can do the same if you switch it to day if you want to
add only one day so let's apply and as a result you can see that we are adding everywhere plus one day so of course we
can add to the intervals negative numbers so let's say we would like to have minus one day let's hit apply and
check the results so as we can see in the results in the new calculated field it's always one day behind the original
field of the order dates so that's it this is how you can work with the date app it's very
simple all right so now we're going to go and create a new view to analyze the average days to ship per subcategory
it's very important for inventory management optimizing operations allocations of resources and so on so
we're going to create that using the date diff in Tableau but first let's bring a lot of data to the view in order
to understand how this works we're going to stay with the big data source let's go to the orders and here we need our
two dates the first one going to be the order date and the second going to be the shipping date and let's add as well
the order ID at the front yeah we can to add everything to see the result and as usual Tableau show it as a year we would
like to see all the details that's why we're going to go and convert it to exact date so for the first one we're
going to do it exact date it might take a little bit long time because we have a lot of data and we have it now as a
continuous I would like to see all distinct values so let's convert it to discret and do the same thing for the
shipping date so we're going to convert it as well to exact date and then two discret so we're going to go and move it
to discret all right so now we have all the information that we need so we have for each order one row now we're going
to go and create our new calculated field in order to find the differences between the order date and the shipping
date so let's go and do that we're going to go and create a new calculated field called days to ship and we're going to
use the function date diff and it needs three arguments the first one is the date part here of course since we are
saying days to ship we are interested on the days how many days it took to place the shipment at the users so we going to
enter here day the start date going to be of course the order dates and the end date is going to be the shipping dates
so we have it like this and let's check the validation the calculation is valid everything is fine let's go and hit okay
and since the output going to be a number table did create it as continuous measure so let's take it and put it on
our view and check the results so let's take for example this order the customer did order in December the 7th and after
after 4 days the customer did receive the shipment so with that you can see the differences between those two days
is 4 days so everything looks good let's take another value maybe some recent orders so I'm going to sort it
descending from the order date and as you can see here the customers did place an order at the last day of 2022 and
after 24 days did the customer receive the shipments so we can see here the days to ship is 24 so this is how the
day diff works now we we're going to go and create our visual so we want to show the average days to ship per category so
now we want to get rid of all those details we don't need them and we just need our measure so now
we need the subcategory let's go to the product and get the subcategory over here and then we're going to take our
measure and put it on the columns but now we have it as a sum we would like to have it as an average so click on the
measure then go to the measure sum and here we have the average so let's switch it to that and now we're going to add
some more informations let's let's add a label and as well let's change the colors so let's bring the average days
to ship control and then put it on the colors and since it's bad thing we're going to switch the colors to Red so
let's go to the colors over here edit colors and now instead of automatic we're going to switch it to Red all
right let's click okay and then we're going to go and sort the list like this so now let's go and check the data as
you can see the worst subcategory we have in our data is the copers it takes longer time to be delivered to the
customers compared to the other subcategories so now the question is we have 5 years of data inside our data
source was it always like this that the copers was the worst or something changed with the time so now in order to
compare the years we're going to add the years to the view in order to compare those informations so we have already
the year prepared from the last time so we have the order date here let's just bring it to the view to the columns so
now if you check the data it's very interesting if you focus on the cers again you can see that in 2018 2019 the
performance was really good even it was one of the best performance in 2019 it gets this light red but something
changed here in 2020 so from 2020 and forward you can see it's always dark red so there's like change in maybe the
resources or in the inventory management we can see it is one of the worst performance compared to the other
subcategories so with that you can compare the years as well together to understand whether it was always like
this or something changed so as you can see using the visualization the coloring and as well those functions
that we has in Tableau to manipulate the dates we can uncover like those Trends inside our data Maybe it's really hard
to find it from the RW data right but if you bring everything with colors and everything in the visualizations it's
going to be really easy to detect so this is exactly the power of visualizations at those functions all
right everyone so with us we have learned how to add and subtract dates in Tableau next we're going to talk about
two functions today and now okay so now we're going to learn about two cool functions in Tableau today and
now in order to get the current dates or the current date and time so let's go all right guys so one of the very
famous use case of the today functioning Tableau is to make something like this you can make highlight in the
visualizations about the current date in the view so we can see here like a separator in the visualizations with the
current date of today and with that you can draw the attentions of the users by highlighting one of those parts so now
let's go and understand quickly what is today function all right so we have those two functions today and now they
are the easiest and the simplest functions in Tableau that will not manipulate or transform anything there
is no concept behind them they will just deliver for you the current date and time informations as you execute them so
for example we have the first one that today it does not need any argument as you can see it's very simple the output
can be a day so you will get the current date informations now we are at I'm recording at the end of my 2023 but if
you are interested to have as well the time information you have to execute now no argument inside it you will get date
and time so as I'm recording it is 6:00 p.m. 10 minute and 40 seconds so that's it this is about the two functions let's
go back to Tableau and start practicing when do you use them all right so now we're going to see
how we can use today function in our visual I ization so the first thing is to create the calculated field so let's
go and create a new one and we call it today then we need the function that's called today as well as you can see it's
very easy we don't need to add anything else and by the way this is always the first calculation that I always create
in each new data source so without knowing the requirement or anything I just go and create this one because I'm
sure that I end up using this function so it's really one of the fair thing that I usually do for each new data
source so let's go and hit okay everything is fine so as you can see we got it on the left side as a new
dimension with the data type date let's check the current information so we can bring to the view table going to convert
it to year so I have always to switch it to exact date and then to discrete in order to see the value and as you can
see we are at the end of my 2023 so now it's very interesting in which year you are now checking the video and following
me in those steps okay so this is how you can create the today function in Tableau now we're going to use it in the
reference line in one view in order to show you how powerful this function and we're going to create a view about the
number of orders over the shipping date so let's go and create it I'm going to remove that today from here and then
we're going to add the shipping date from the orders the columns and then let's take the number of orders the
orders counts let's take it to the rows and now instead of having the years I would like to have months so I'm going
to do now a quick format so let's go to the field and then we're going to go and pick this one month so let's click on it
and the visualization type look as well good so now let's go and create a new reference line in order to do that we're
going to go to the access over here right click on it and then we have here the option of add reference line here
the most important things to customize is the value of the reference line I would like to have the value of today as
a reference line to indicate the current information the current date but if you go to the values over here you will see
that I can either create a new parameter or I can use only the shipping date and that's because our new field today is
not yet in the visual so we have to add it to the visual in order to do that we can close this first and then we take
that today and drag and drop it in the details but we are not there yet because Tableau did convert it to a year and I
would like to have in the reference line the exact date of today so in order to do that we're going to convert it to
exact date right click on it and we have here the option exact dates so that's this is the requirement to add it in the
reference line let's go and add again the reference line and we go to the values let's check yeah we got the today
value so let's select it and then hit okay so now here on the right side we got a very nice reference line
indicating of the day of to date but still there's like a problem right because all of the data is behind the
reference line because the data is little bit old so now in order to make it more interesting I'm going to add two
years to the shipping date to make the visual look better so in order to do that as we learned before we're going to
go and create a new calculated field let's call it shipping dates plus two years and here we're going to add date
add first we need the date part so we are saying plus two years we are talking about years the interval going to be two
and the date going to be the shipping date all right so with that we are done the calculation is valid let's click
okay so we have it now on the left side and what we're going to do we're going to replace it with the old value so
let's just remove the old shiing date and get the new one to the rows we're going to do the same steps so we're
going to convert it again to month let's do that and now as you can see we have values for 2024 2025 so let's add again
the reference line right click on the axis add reference line and let's go to the values and let's select that today
so now we got a very nice Cut in our visual in between our data to show the past today and the future so now we can
go and add little bit customizations just to make it look better so for example as you can see we have a label
over here for the reference line says minimum today I would like to show immediately the value of the current
date in order to do that right click on the line and then go to edits and then we have to change the label over here so
instead of the computation let's change it to the value and with that as you can see on the right side we get immediately
the current value of today the next step I would like to add some coloring to the reference line so right click on the
reference line and let's go to format then we have here three informations to customize the first one is the line
itself then fill above that means all the information on the right side fill below going to be all information on the
left side so for example let's start with the line I would like it to have it dotted and as well red the osity I'm
just going to make it to the 100 so now the next value going to be the fill above I would like to highlight it with
green so let's go and pick the color green over here and then the next one can to be the below you can leave it
like white or you can make it like gray in order to show this is history so with that as you can see the visual going to
look more professional so we are highlighting the future and the history is like gray out so that's it with a
small functioning Tableau like the today function you can create amazing dashboard and visuals for your users and
this is one of the most common use case of the today function in Tableau to highlight the data okay everyone so
that's it for today and now functions with that we have learned all the use cases for the date functions in Tableau
we have covered around 10 functions in Tableau next we're going to jump to the next group we're going to learn about
the null functions okay so now we're going to focus on another group of functions
under the category roow level calculations the null functions the main purpose of the null functions in Tableau
is to handle and manipulate the missing values in our data the nulls we can have missing values like everywhere in text
dates numbers any field in our data source can have like missing values so why handling the missing values handling
the nulls is very important step in the analyzis and that's because of two things first the calculation accuracy
null values can affect the calculations and aggregations in their results so if you have null values in our data and we
ignore it we don't do anything about it what going to happen we're going to have incorrect calculations and corrupt
results the second reason is to improve the data quality and to achieve completeness identifying the data Gap
that wrong in the data entry and having issues in the data collection can help the overall data quality in our data and
can improve as well the completeness in the data visualizations so that's why the null functions in Tableau are very
important to to have accurate and correct analyzes in the data visualizations so as usual let's
understand the concept then we can practice let's go okay so now let's go and understand
those three functions ZN F null is null in order to handle our missing values as usual we're going to go with the example
because it is the best way to understand those functions all right so now we're going to have four customers and their
sales as you can see only Maria has a missing value in the sales so we have have here a null in order to handle this
null we have the first function in Tableau the ZN ZN stands for zero nulls it can replace the null values with zero
so it's very simple if you use now the ZN function for the sales for the first value we will not change anything right
we will get exactly the same value but for the next one since it's null it's going to replace it automatically with a
zero the next two customers we will get exact values because they are not nulls so as you can see very simple we are
just repl replacing the null values with a zero so this is very quick way to replace the nulls but here the problem
is we have no control what we are replacing so here we cannot specify something else we will always get a zero
in order now to specify our value we can use the second function that we have in Tableau if null if null it going to
replace the null value with a specific value from us so if you use this function on the sales it can has the
following syntax it needs two arguments the value that we want to manipulate and the value that we specify so this
example I'm going to specify it as zero it doesn't make sense because we can use ZN but just to show you that we're going
to get the same results so you can go over here and put anything you want so for the first customer we're going to
get exactly the same results for the second customer we're going to get again zero because we specified that we have
the control on that and then for the last two customers we're going to get exact results and here the output is a
number because the field that we want to manipulate is a number but let's say that we take another field which is a
string the output going to be as well string so here is exactly the difference between Z in and ifnull z in accepts
only numbers but the ifal accepts any field from your data source so for example let's say that we have the
countries so Joan has no value in the country same for Martin we have only for Maria and George informations inside the
field country here we cannot go and use the Zid in function because it's not number it's string so in order to
manipulate those values or to replace the null values we're going to go and use the if null so the syntax going to
look like this if null country then we have the abbreviation of not applicable so the output here going to be a string
value for the first customers we're going to replace the null with an a the next one is going to stay the same
because there is nothing to replace the third one we're going to get as well not applicable and for the last one we will
get France so nothing to be changed so this is exactly the differences between the F null function and the ZN function
in Tableau now we're going to go to the last function is n n sometimes we might be in situation where we want to check
whether the field has null values or not so we don't want to do any actions yet we are just checking right so the is
null in Tableau going to return true if the value is null and false otherwise so that means if there is no value if we
have missing value we're going to get true if there is a value we will get false so the output of this function
going to be with the data type Boolean with only two values either true or false so let's check the example or the
syntax in Tableau it's going to accept only one argument the country and that's it so the question for the first
customer is it a null yes it's null so that's why we're going to get true for the next customer is it null in the
country we know so we're going to get false the same for the third one we're going to get true and the last one we're
going to get false because we have a value in the country so that's it for the isnull so we have three functions
three tools to manipulate or to check the null values inside our fields and they are really useful to improve the
quality and the completeness of your visualizations so now let's go back to Tableau and start practicing
them okay so this time we're going to go to the small data source let's check the orders information so we're going to
take the order ID and we're going to take this time the profit so drag and drop the profits on the ABC over here to
see the values and now if you check our data you can see that the order seven don't have any profit informations and
as well the order 10 don't have anything so we have here missing data we have nulls so now let's do something about it
and fix it instead of having null we have to have zeros so here we have two functions to do it let's start with the
first one the ZN zero nulls so now we're going to fix it and create a new calculated field we're going to call it
profit ZN and the syntax start with the function ZN and it needs only one argument the field that we need to fix
so it's going to be the profits so that's it with that we are changing all the null values to zero so again in this
function we don't have control to change the value to something else it's going to be always zero so the calculation is
valid everything is nice let's click okay and as usual we're going to get new measure since the output going to be as
well the profit informations so drag and drop this new information to the view and now we can see on the results all
those values going to stay the same only we are manipulating the nulls so we are replacing the nulls with a zero here as
well for the order number 10 we have null now we have a zero so it's really easy and quick fix all right so now you
might say you know what why we are making all those efforts to replace those missing values with zero so what
is the big deal I could just leave it as a null and the users might accept it so why you are doing this well it's not
only the visual going to be better but also having missing values going to bring wrong and inaccurate aggregations
so let me show you what I mean let's just remove the order ID away and now you can say okay we got the same numbers
right we got the same aggregation so everything is accurate and fine well not exactly this is only for the sum so now
let's go and switch them both to the average so we're going to go over here and switch it to average and we're going
to do the same for the corrected one so now I'm going to just make the headers a little bit wider to see the values so
now as you can see now we are getting different values so with the Z in function we got different average from
the original data and that's because in this average we are not counting the orders with the missing values with the
ZN we are counting now the orders with the missing values so that means replacing the missing values with zeros
we will get accurate results at the average in the aggregations compared to the old one so that's exactly why we go
and replace the missing values with zeros especially for aggregations and calculations all right so that's why we
do it now let's go and try another function we're going to use the if null in order
to replace the null values with zeros and now I'm going to just bring the order ID to the view to see all the
orders let's go and create the new calculated field and we're going to call it profit if null and the syntax starts
with if null and it needs two informations the first one going to be the field that we want to manipulate so
it's going to be the profit again and for the next information we have to specify which value going to replace the
null so in this example we're going to stay with the zero so the calculation is valid let's hit okay and we got again
our new calculated field let's bring it to the view and check the results as you can see it is identical to the ZN so for
the order number seven instead of null we got zero the same for the 10 we got as well zero so in this situation if we
want to replace it with zeros I would go with a z n since it's just faster to write it so now let's move to the next
scenario where we want to replace the nulls with the value one so this time we cannot use the ZN because ZN can
automatically convert it to zero we're going to stick with the if null so let's go and edit our
calculation and instead of zero here we're going to specify one so let's go and hit okay and now we can see instead
of having zero we have the value one so instead of null we have one so this is the advantage of the F null we can
control which value going to be the replacement for the null all right the next advantage of the if null is that we
can replace not only number values we can replace as well any other data type so let's take an example we're going to
go to the customers and let's get the customer email to The View and as you can see here we have some nulls we don't
have all the emails from all customers but now the task is to replace those nulls with unknown so let's go and
create a new calculated field in order to replace those values let's call it customer email if null and the text
again if null it accepts two arguments the field that you want to manipulate it's going to be the customer email so
this one over here and which value we're going to use in order to replace the nulls it's going to be the unknown so
that's it the calculation is valid so we're going to replace all the nulls with this value so let's go and hit okay
and now we have again here a new dimension in our data source let's grab it to the view and check the values so
now if you just compare those two columns you can see instead of null we are getting unknown the same here and
the third one over here here and the others will not be affected because we have a value inside the field so as you
can see it's really nice and quick way to replace those bad nulls in the view so that's all for the F null now let's
check the last one we have the isnull so the S null will not replace the values with anything it's just to
check whether there is a null or not so let's say that we want to check whether in the field profit we have any nulls in
order to do that we're going to go and create again a new calculated field let's call it a profit is null and the
Syntax for that is very easy so is null and it accept only one argument it's going to be the field that we want to
check so we are checking the field of profit so the calculation is valid and that's it it's really simple we are
checking whether this field contains any nulls inside it so the output can to be either true or false so it's going to be
a Pion so let's hit okay and now as you can see on the left side we have a new field with the data type bullion because
we have only true and false let's drag and put it on The View over here and here we can see quickly all those orders
is a false because we have a value inside the profit but here we have a null that's why we are getting true and
here again we have a true so with that we can check immediately whether we have nulls inside our data or not so let's go
and show it as a filter this is what I usually do so if I see there is true I'm interested to see those values so I can
see all right we have two orders where we have nulls inside the value profits so this is really quick way in order to
check whether we have any problems any nulls inside our fields in order to make plan what we going do about it but here
in the small data source it's really easy to see individual like all the orders we have only 10 orders but
imagine you have thousands or millions of orders inside your data individual it can be really hard to see so let's take
an example in the big data source so we're going to go over here take again the order ID and as well let's check
this time the sales so drag and drop it into the view as you can see it's really hard to check now in the view whether we
have nulls or not so instead of that we can do a check so we're going to go and create a new calculated field let's call
it sales is null and now we're going to use the function is null this time the field going to be sales so we are
checking the sales so let's go and hit okay and now we're going to show this field as a filter so now in the filter
we can see immediately that we have only one value false so we don't have true that means we don't have any nulls
inside our data so this is very quick check inside our data to see whether there are nulls instead of just like
scrolling down and checking all the orders that's why we need the is null function so with us we have covered all
the three functions that deal and handles with the null this is very important to improve the quality of your
visualizations and to bring accurate data in the aggregations all right so with that we have covered everything
about how to handle the missing value the nulls in Tableau next we're going to move to another group of functions The
Logical functions okay so now we're going to talk about the last group of functions
under the category roow level C calculations in Tableau we have the logical functions the main purpose of
the logical functions in Tableau is to make logical decisions based on conditions and here we have two use
cases the first group is the conditional operations here we have like if else if casewin and so on the main focus here is
to create conditional Logics and make decisions based on those conditions in order to manipulate the data and the
second group is The Logical operators here we have three operators and or not and the main purpose of this group is to
evaluate and to combine multiple conditions in Tableau so now let's go and focus on the first group The
conditional operations and as usual first we have to understand the concept behind them then we can practice in
Tableau so let's go all right everyone so now we're going to do Deep dive in those logical
functions in order to understand how they work and how they going to be executed and now we're going to start
with the symbolist form of the F statements where we have only one condition and in this example the
condition going to be if the sales is higher than 1,000 then we want the value High otherwise we end nothing going to
happen and now let's see the flow charts on how this going to be executed so we start first with checking the condition
here we have always two ways either false or true if the condition is fulfilled if the sales is higher than
1,000 then we go this path where we're going to have the value high so if it's true we're going to get the value high
and then everything ends the other path if the sales is not higher than 1,000 then it's false then we're going to skip
everything so that means nothing going to happen let's have the following example let's say that the sales has the
value 1,200 so now first we're going to check the condition is the sales is higher
than 1,000 well yes it's true so what can happen we can execute the high and it's going to job to the end and if you
are looking to the Chart over here first we are asking the question is the sales higher than 1 ,000 the answer is going
to be true so we are taking the Green Path this one where we can execute the high let's take another example where
the sales equals to 700 so we start over here again we ask the question is the sales higher than 1,000 this time it's
not true so it does not fulfill the condition and we're going to go with a path on the right side so what going to
happen nothing going to happen the high value will not be executed and in the output we're going to get the value null
because there is nothing going to be executed so it's really simple right you are asking always the question that
could be answered with yes or no true and false you have always two bath for each condition so this is the simplest
form of the F statement let's move to the next level where we're going to have F else statements so now we're going to
stay with the same condition if it is fulfilled then we're going to get the value high but let's say this time if it
is not fulfilled it is false I would like to get a value instead of null so here we can add the keyword else so what
we're going to do we're going to add between if and end an else statement to say okay if it is not fulfilled give me
the value low so let's check the flowchart how it going to look like we start first was checking the condition
if it is true the first path we have the value high but if it is not true this time instead of just jumping immediately
to the end I would like to get the value LW using the else so that means the output of the FL statement it's going to
be always a value either high or low we will never get a null so let's take an example let's say that's the same is
1,200 it going to fulfill our condition so we're going to get the value High and the program going to end on the right
side as well the same thing what's can to happen we're going to check the condition and since is true we're going
to get the value High and the program ends the output going to be the value high so here it's like the last one but
now if the sales equals to 700 the condition is not fulfilled and now instead of jumping immediately to the
ends it's going to jump to the Sal statement so now let's check another value where the sales equals to 700 the
condition will be not fulfilled so it's going to fail because the sales is not higher than 1,000 so what going to
happen this time we can to execute the else statement we will not jump immediately to the end so we're going to
go to the else and then we can to execute the else so in the chart we check the condition and we took the
right path where it is false so now once we are at the lse statement it's not like the if here we will not have any
condition we have only one path so we can execute the law and the program can to exit so what's going to happen we
will just get that value low and we end so the output going to be the low value instead of having nulls so else will be
always executed if the conditions are not fulfilled so that's it for the else statements it's very simple now we're
going to go to the next level where we want to add multiple conditions in our statements all right so now we're going
to talk about the lsf statements we can use it in order to add multiple conditions to our statements so far in
the previous examples we worked only with one condition we are checking with her the sales is higher than 1,000 and
if we are using the FL statements we're going to get either high or low let's say that we want to introduce another
condition in our statements to get the value of medium so now we would like to add a new condition between if and El
exactly after the F statement but now we cannot go and use if again as a keyword instead of that anything after the if we
can start using the else F statement to add more conditions so for example we can add the following condition in
between it's called else if the sales is higher than 500 then we're going to get the value medium so that means in the
whole statements we can have only one if and only one else but we can have multiple else if in between if we want
to add multiple conditions so now let's see how the workflow going to look like we start as usual with the first
condition in the if statements if it is true what going to happen we can to get the value high and everything going to
end so now if that condition is not fulfilled in the first F we going to talk come to another condition in the
else if so here we have another condition where we're going to check if the sales is higher than 500 and here we
have again two ways out of this either it's going to be true either it's going to be fulfilled so what can to happen
we're going to get the value medium and then ends and the other one if the condition is as well not fulfilled then
we're going to go and execute the else statements so as usual the lse statement does not has any condition it's going to
just execute the value and ends let's see a few examples in order to understand how this works the first
going to be the sales equals to 1,200 we are checking now the if condition as you can see it's going to be fulfilled we're
going to get the value high and that's it so what's going to happen we just going to skip everything to the end if
we are checking the workflow so we're going to check the first condition and we will take this pass so everything
else going to be ignored and will not be executed we will just get the value high at the output all right so now let's
take another value the sales equals to 700 so we are at the first condition it will fail so we will not get the high
value instead of that we going to jump to the next lsf statement so we are now at the right path the true path going to
be deactivated so we have here again another check so we are checking is the sales higher than 500 well this time
it's going to be fulfilled so what's going to happen we're going to get the value medium and then the program going
to skip so with that we are at this path where we got the value Medium as an output so this means again that the L
statement will not be executed all right moving on to the next example where the sales equal to 350 50 again we are at
the first check 350 is not higher than 1,000 that's why this going to fail then we going to jump to the next one to
check whether it's going to fulfill this condition and the sales is as well here not higher than 500 so this going to
fail as well so since now both of them are failing what going to happen we're going to go to the default the default
value is the else so this going to jump to the else and we will get the low value from our statements and this going
to be executed let's check the right side on the workflow as you can see we are the first condition it failed we go
to the second one it failed as well then we go to the last option that we have to the lse statements we will get the value
of low so that's all about the lsf statement if you have a third condition you just can add it after the elsf or
before it so with that you can add multiple conditions to your statements and understanding The Logical workflow
behind those statements is very important to understand those functions so all what you are doing here is we are
evaluating different conditions and based on the evaluations we will get in the output different values in this
example we have three possible values high medium and low all right the case whenn statement
it is very similar to the if statement here we're going to evaluate as well multiple logical conditions and based on
our evaluation we will get an output value so let's take an example in order to understand the syntax it start always
with case then the field that we want to evaluate so now we're going to go and evaluate the values inside the country
so the first condition going to be like this we can write when then if the value is Germany inside the country then the
output going to be de here we are trying to make like in the output abbreviations from the countries now we're going to go
and make another condition for another value inside this Dimension so we can evaluate the value France if it is equal
to France then the output going to be F then moving on to the next condition we're going to evaluate the USA value
inside this D di menion if it is equal to this value then the output should be us so as you can see using the case when
we are evaluating the members or the values of a dimension so here we are evaluating like so here in those
conditions we are evaluating a scenario so what can happen if the value of the country is Germany and so on so so far
we have three conditions and if you are done and you would like to have a default value if none of those
conditions are fulfilled so if the value of the country does not fulfill those three conditions what can happen we're
going to go and execute the L statements and at the end we're going to have as well an end so as you can see it's
really simple and easy to read and as well easy to write all right so now let's go and have an example in order to
understand how the execution can be done so let's say that we have the Germany value inside the country so now as the
code going to be executed we're going to start from top to bottom so that means we're going to first evaluate the first
one it's going to be when Germany then de so as the values are matching we will get the value de at the output and the
code going to skip everything else so we will not check France USA and so on so the code going to go to the end and as
output we're going to get de it is very similar to the FL statement right so let's take another example where we have
France in the country so here we start moving from the top to down so again the first condition can be checked when
Germany then the E this time we don't have a match so here we have France and here Germany so it's going to fail we
will get false that means what going to happen we're going to jump to the next condition to check and eval valate the
next value so here we're going to check again when the value is France then IFR this time we have a match so we will get
a true and with that the application going to like skip the other conditions to the end so that means in the result
we're going to see F so now let's move to the last example where we going to evaluate the value Spain in the country
so what going to happen again top down this time none of those conditions going to be fulfilled right so from the first
one we going to jump to the second because it has Falls as well from the second to the Third it's false that
means we're going to go and execute the else else can be executed if all conditions are not fulfilled so in the
output we will get the na not applicable so it's very similar to the FL statements now we're going to go and
compare all those stuff side by side so now so now we're going to go and compare three functions F statements iif casewin
I know that we didn't talk about the iif but now we're going to check the syntax in order to understand the differences
between it and the F statement so let's start with the first one here the syntax we have multiple conditions so we have
two conditions we have F sales higher than 1,000 then High else F sales is higher than 500 then medium L slow end
so with that we are evaluating multiple conditions in one statement so now let's move to the next one we have the ifif
iif is very similar to the FL statements we will get the same output but we write it in different and easier syntax so
let's see the syntax as you can see it's very small it starts with the iif then the condition itself so the Sal higher
than 1,000 here we have two outputs whether it's false or true the first one is about the true so if the condition is
fulfilled we will get high value but if the condition is not fulfilled we will get the low value so here we going to
write what can happen if it is false and here we're going to write what can happen if it is true so if you compare
to the FL statements it is easier to write and as well shorter so here we don't have like keywords like else or at
the ends we don't have the keyword end so it's really short and quick to create but here of course we can evaluate only
one condition so now we can move to the case win as we learned before it's going to evaluate the values the members of a
dimension so here we're going to evaluate the country then we have multiple conditions if none of them is
fulfilled we're going to go to the L statements and then we have an end so now let's learn the main differences
between them the first one is about whether it's going to support multiple conditions as you can see in the FL
statements we can add many conditions as we want so it supports multiple conditions the iif supports only one
condition the casean as well supports multiple conditions okay so now let's move to the next one we're going to talk
about whether it going to support multiple Fields the FL statements can support multiple Fields so we can have
in the condition not only the sales but something else like the country as well so the FL statement support multiple
Fields the same for the ifif it support as well multiple Fields but in the case when it supports only one dimension so
here we cannot evaluate multiple dimensions in the same case r statements so here only we are talking about the
country we cannot add any other fields inside the statements so here we have limitation in the case when statements
compared to the other two so now let's talk about supporting the data types the FL statement and the ifif both of them
they support any data type that's why I said here it going to evaluate multiple Fields so here we could have a dimension
a measure any data field that you have in your data source it could be evaluated inside those conditions but
the case when here we have another limitation we can evaluate only string values only Dimensions so here we cannot
go and evaluate for example the sales or profit or a quantity so any measure we cannot use it inside the case when
statements it should be exactly a string we cannot even use for example a date the order date so here the field should
be a string value so now let's go and check the main advantage of each method the first one is as you can see we don't
have any limitation the iif here the advantage is easy and quick to write and in the case wi here we have again the
advantage of easy to write and to read so if you look at the case wi statements and to the FL statements you can see the
case when it's like organized it's easy to read it has like a flow in compared to the fls here we have a lot of
different keywords and like it's not that easy like the case win so here my recommendation for you is if you are
evaluating only one condition with the output of two values then always use if it's very quick to create but now if you
have multiple conditions and you want to evaluate it then think about the casewin is it like data type string are you
evaluating only one field if that's the case then use case win it's easier to read and as well to write but if you are
talking about multiple fields and not only string values then you have to go to the FL statements always starts with
the iif then the casewin and then if you don't have any other option go to the FL statements all right so that's all about
those methods we're going to go now and practice in tableau all right so now let's go to the small
data source we're going to go to our customers let's grab the first name to the view and as well the country
informations so now the task is to create country abbreviations shortcuts from the original values that we have
inside the country in order to do that we can use the FL statements and we're going to do that step by step so let's
go and create first new calculated field let's go let's country if so now we're going to use the keyword if and after
that we have to specify our condition so the first condition going to be if the country equals to Germany then the
abbreviation going to be de so let's create that so if the filled country equals to the value Germany make sure to
write it exactly like our data capitalized because W here is K sensitive so now what happen if the
country equals to Germany we would like to see in the output the word de so if it is true we're going to get the E if
it's not true then let's try the first one that we just exit we don't have any statement or any other condition so
that's it so this is the simplest form of the F statement let's go and hit okay so now as usual we're going to get a
discrete dimension in the data source pane with the data type string because the output is a string we have the
abbreviations so let's drag and drop on our view to see the values all right so now let's go and check the values for
the first customer you can see that the value is not equal to Germany it is not fulfilling the requirements we will get
null the same thing for John as well USA not fulfilling requirements so we get now as well for the next two customers
you see they fulfill the requirements and their condition that's why we will get the value de for both of them and
for the last customer P you can see the value is not fulfilling the condition we're going to get null so as you can
see we are getting only one value the otherwise it's going to be null all right guys so now let's go to the next
step and I would like to get rid of those nulls I want to see a real value in the visualizations so if the
condition is not fulfilled I want to see the value not applicable in a so now in order to do that that we have to use the
lse statements in our calculation so now let's go to our field and instead of changing the calculation inside this
field I would like to duplicate it and make a new one so let's duplicate it and then edit the new one I'm just going to
call it if else and now we're going to have the same condition again if the country equals to Germany we can get de
otherwise we will not skip otherwise we can add the else statements so it's going to be always before the end and
after that we don't add any condition we just have to add the value so the value if the condition is not
valid going to be not applicable so that's it that means if it's true we're going to get the E if it's not then
we're going to get the not applicable let's go and click okay and we're going to go and check the values as well in
the view just make it little bit bigger to see those informations and now as you can see instead of having nulls we are
having now a value which is really better for the visualizations and as well for the user experience to have
value instead of nulls nuls is always ugly in the views and with us we're going to control which value can to be
presented to the end users if the conditions are not fulfilled so now as I recommended before if you have only one
condition where the output is only two values then the best way is to do iif so let's go and create it we're going to go
and create a new calculated field we're going to call it country iif and let's see the syntax so it start with the
keyword ifif and here as you can see it need three arguments the test it's going to be the condition what can happen if
the condition is fulfilled so we have to specify it in the second argument in the third one what can happen if the
condition is not fulfilled so the condition is if country equals to Germany so this is the condition what
can happen if this is true then we're going to have the then the next step is to Define what will happen if the
condition is not fulfilled so the country is not Germany it's going to be na a so as you can see it's very quick
and very fast to create such a condition and compared to the F lse end and so on so this is the quickest way in order to
create such a condition so let's go and hit okay and check the results so with that again we're going to get a new
dimension let's drag and drop it over here in the view to check the results just going to make it a little bit big
so as you can see we're going to get the exact result as the FL statements so the first two countries are not fulfilling
the condition we're going to get na the next two customers they are from Germany we're going to get de and the last
customer is not from Germany that's we are get na so this is the magic of the ifif not a lot of people use it actually
it's not that common to be used but it is very nice way to quickly create conditions in Tableau I totally
recommend you to use it all right guys so now we're going to move to the one more step where we're going to add
another condition so we don't have only one we can have multiple conditions that's why we cannot use the iif we have
to go back to the F statements so let's see how we can create it I'm going to go and duplicate again one of those fields
so let's go and do that and then let's go and edit it I'm just going to call it if else else if statements so we're
going to stay with the same informations right the first one we are checking the Germany so this is the first condition
and else going to be in a so now we're going to go and add a new line between the F and the else and we can to add a
new condition by adding the keyword else F so it's like the F statements we can write our condition so if the
country this time equals to let's say France then what can to happen we can have the abbreviation f r so that's it
with that we have added our second condition and as usual we start the execution from from top to bottom so the
first condition to be checked is if whether the country equals to Germany if it is not correct then it going to jump
to the next condition so let's go and hit okay to check the results so let's go and grab it from the data pan and
drop it on The View and now we can see that there is one customer with the new data so as you can see George from
France we got the abbreviation of FR FR and that's because the country equal to France and with that we are fulfilling
the second condition the USA for John and B they still don't fulfill any any of those conditions it always be
executed from the else and Maria Martin going to be executed from the first condition where the answer going to be
de so that's it now we're going to go and add the final step where we can add the third condition for the country USA
because we still are getting those not applicable for those two customers I'm going to go to the same field this time
I Will Not Duplicate it so let's go and edit it and we just have to add one more condition right so I'm just going to
copy those stuff and then as the next Condition it's going to be as well lsf country equal to this time USA then what
can happen if this condition fulfills we're going to get the abbreviation us so as you can see it's very simple to
add one more condition in the lsf let's go and hit okay so now we can see in the results all those customers that come
from USA they have now the US abbreviation and with that we have covered everything with conditions and
none of those customers can to be executed from the else so we don't have the na anywhere in the output which is
really nice and now we can see in the view very nicely how we started with the simplest form of the if statement and we
end up with the complete form of the if statement so now next we're going to solve the same task but this time using
the casewin statements all right so now let's go and create a new calculated Fields we're going to call it country
case win then the syntax start with the case then we have to specify the field that we want to evaluate it's going to
be the country so once we do that we start defining now our condition the first condition going to be the Germany
value so when the value equals to Germany then what going to happen we're going to have the abbreviation de so
that's it the next condition going to be when country equals to France then the abbreviation going to be F FR and we're
going to go to the last condition when the country equals to USA then the value going to be us so that's it you see how
quickly we defined three conditions using the casewin it is very logical and as well very easy to create right so now
if none of those conditions are fulfilled let's get that not applicable and we have to end it so that's it as
you can see the calculation is valid and it's really easy to read as we right so it is everything like structured I liked
a lot using case when statements in compared to the fs so that's it let's go now and hit okay to check their results
and now we got a new dimension as usual from the calculated field let's put it in the view to check their results so as
you can see we're going to get the same results but in this situation for this task I'm going to recommend you to use
the case when since as you can see it's very easy to write and as well to adjust later or to add more conditions if it's
needed so with that we have learned how to use all those logical operations in order to create new logical
conditions all right everyone so now I'm going to show you a very common use case that you might find it in many projects
where you're going to go and create the colors of the qbis using the logical conditions so let's go to the big data
source and we need the subcategory from the products as usual to the rows and then we need the sales from the orders
so let's put it in the columns and then we're going to sort it we're going to add the labels and now we need the
colors for this qbi so let's go and create our new calculated Fields we're going to call it qbi colors and the
logic can be the following if the sum of sales are higher than 200ks I would like to see the green color anything between
200ks and 100K is going to be the orange color and anything below the 100K it's going
to be red so now we have to decide on the method that we want to use in our calculation as I recommend you always
start with the ifif so now in the logic we have multiple conditions we cannot use it so ifif is only suitable if we
have only one condition so iif is away the next one we're going to talk about the case win but since the conditions
are based on the sum of sales it is integer we cannot use the case wi because case win can accept only string
values so this is as well a way we are left only with the FL statements that's why in this calculation we're going to
build it based on the fls so let's go and do that we're going to start the context over here with the if and then
we have to specify our first condition anything higher than 200ks it should be green so now we are talking about the
fill sales but in the sum because in the visualizations we have the sum of sales so if the sum of sales is higher than
200 case then what's going to happen we going to have the color green so that's it for the first condition now we have
to specify the condition for the orange so anything between 200 100K and 100K it should be orange so let's go and specify
that so else if again we're going to have the same field sum of sales higher than
100K then it's going to be orange so now you might say you know what in the condition that you just say it has like
two boundaries right higher than 1,000 and lower than 2000s well the first boundary we have it already with the
first condition checked so if it is higher than 200ks it's going to get green and this going to be skipped so
anything going to be checked in this case is going to be lower than 200k that's why I specified here only the
lower boundary so that's it for the orange the last one is going to be if the sum of sales is lower than 100K what
going to happen we're going to get red so let's go and specify that going to have another elsf sum of s
and lower or equal than 100K then it's going to be red so with that we have covered the third condition the third
color and we covered everything we covered all possible values that could happen that's why it doesn't make any
sense to make an L statement we just can go and end it so now let's check everything is fine now we got an error
because I think I missed here to close it so now let's check it again the calculation is valid so that's it we
have three conditions to three colors let's go and hit okay all right so now we have our Dimension over here we're
going to use it for The Coloring right so let's drag and drop it on the colors over here and now as you can see our
colors are splitting our view Tableau got it almost correct so we have here orange red but this one is not blue so
let's go and change it we're going to go to the colors then edit colors and now instead of green as blue we're going to
have it as real green so let's go and hit okay so with that we got the colors of our kbii so as you can see all those
subcategories with the sale skills are higher than 200k they are all green as supposed to be and now anything between
200k and 100K you can see all of them are orange and anything below is red so as we can see we can do a lot using
those logical conditions we can use it in order to create the coloring in Tableau we can use it to create new
informations like in the country abbreviations they are very necessary to understand all right so so far we have
learned how to create conditional Logics in Tableau and how we evaluate it in order to manipulate our data based on
the decisions next we're going to start talking about The Logical operators and or
not okay so now we're going to learn how to combine how to evaluate multiple conditions in Tableau using the logical
operators and or then we're going to learn about the not operator so let's go and understand the concept then we're
going to practice let's go okay so now let's start with the and or operator let's have the following
scenario let's say that we have one condition where we are checking whether the sales is higher than 100 and a
second condition where we are checking whether the country is Germany so now if you want to go and evaluate both of them
you want to combine those two conditions together so that they work together we can use the and or operator in between
so here we can use those two operators to combine the condition a with the condition B and the output can be as
well as usual aulion true and false so our two operators and or they are logical operators that are used to
combine multiple conditions so now let's say that we're going to use them in FL statements let's see how the syntax can
to look like let's start with the end operator so as you can see we have here the F statements then we have our two
conditions and in between them we have the and operator so the condition going to combine both of them in one statement
so if the sales is higher than 1,000 and a country equal to Germany then we're going to get the value high if it is
true otherwise it's going to end and we will get null the same thing for the or operator we are seeing here if the sales
is higher than 1,000 or the country equal to Germany then we can get the value high so as you can see it's really
simple let's check an example in order to understand what are the differences between and or so now we have in our
table four customers with their sales informations and the countries so the first condition going to check whether
the sales is higher than 1K so now let's check the first customers we're going to get true because the sales is higher
than 1,000 and the last two going to be false because it is below 1,000 so this is the information from the first
condition then the second condition that we have we're going to check whether the country equal to Germany so the first C
is from Germany that's why it's true the second one is not we have it false then the next one is Germany true and the
last one is false so now as you can see we are evaluating the table first in order to get the result for each single
condition but now what we can do is we can go and combine those two conditions to generate new results so now if you go
and use the add operator it going to return true only if both conditions are true and false otherwise so now let's go
and combine those two conditions together using the end operator let's check the first customer we have the
condition a is true condition B is true as well so we are fulfilling the requirement to get it through so for the
first customer we're going to get the output true for the next customer Maria we have in the condition a true but in
the condition B false so it does not fulfill the requirement both of them should be true to get it through that's
why it's going to be false for the next one Martin going to be the same so the condition a is false the condition B is
true both of them should be true that's why we're going to get false the last one anyway both of them are false so
we're going to get false so as you can see the end operator is very restrictive both of the conditions should be true in
order to get true otherwise immediately you will get false so this is how the end operator Works let's go to the next
one we have the or operator or operator going to return true if at least one condition is true otherwise it's going
to be false so that means we need at least one true to get through in the output so let's go and check the example
again for the first customer we are fulfilling the requirement we have more than one so both of them are true that's
why in the output we will get true the next one we have true at the condition a false at condition B at least we have
one so we are fulfilling the requirements it's going to be true as well the third one the same so so we
have at least one true and the condition B that's why for Martin we're going to get a true but for the last customer
George both of them are false so we need at least one true to get through that's why the output going to be false so as
you can see the r operator is less restrictive than the ant we need at least one true to get through at the
output so this is how the and and or operator Works in Tableau in order to combine multiple conditions one more
thing to notice here as well is that if you are using and and or we are evaluating the end result of the
condition so we are not evaluating the table itself we are evaluating those results that we got from the conditions
okay so now we're going to talk about the third operator the not operator so let's take an example we're going to
have the following table and we have our condition where the sales is higher than 1,000s so we will not use the not
operator to combine two conditions together like with the and or operator but this time we're going to reverse the
results of the condition so the nut operator is a reverse logical operator it going to return true if the result of
the condition is false and it's going to return false if the condition is true so if you tell it to go right it's going to
go left if you tell it to go left it's going to go right so it's going to do exactly the opposite so let's see what's
going to happen if we say not this condition so if you use the not operator for the first customer you will get
false because the value is true the same for the second customer you will get false but for the next two customers you
will get true because the output of this condition is false so as you can see at the result we're going to flip the truth
we're going to get exactly the opposite if you use n so it going to look like this in the calculation in Tableau so
here again we have our F statement our condition but just before the condition we're going to go and put nuts and with
that you are reversing everything so now what we are seeing here in this condition if the sales is not higher
than the 1,000 then we're going to get the value low so that means anything equal to 1,000 or smaller than 1000s
it's going to be low so we are reversing the results so that's just this is how the nut operator works now let's go back
to in Tau and practice those three operators all right so now we're going to go to our big data source let's grab
the informations of the customers to the view so we're going to get the customer ID the first name country and the scores
as well but I would like to show the discrete values of the scores so let's switch it to discrete and then we need a
measure let's go to the orders and get the sales so put it on the columns and as you can see now we have for each
customer the total sales that they ordered so now the task is to not show all the sales of all customers we want
to focus on specific group of customers so now we want to show the sales for only customers that come from Germany
and their score is higher than 50 so with that we have two conditions and we can go and use the and or operator in
order to combine them so as usual we're going to go and create our new calculated field and we're going to call
it sales and so so we're going to start with the if statements now we need to write our conditions so the first
condition the country should be equal to Germany so the country fied we have it over here must be equal to Germany and
now we since we are saying and in the task it's going to be here as well and in order to connect the second condition
so the second condition the score should be higher than 50 so the field score should be higher than 50 so now we have
our two conditions both of them are connected with the and operator so now if both of them are true what going to
happen we're going to show the value sales so next we're going to say then sales and otherwise it's going to be
null so that's it we're going to go and end the statements so with that we can see that the calculation is valid
everything is fine so let's go and try what going to happen let's go and click okay now we have our new field in the
data ban on the left side it going to be continuous measure because the output going to be sales so now we're going to
go and check the values but first I would like to get rid of those parts diagrams I'm just going to move the
sales to the details and then move it again to the view over here at the APC so now we have those values let's get
our new sales with the and operator and put it as well on The View just let's make it a little bit bigger to see the
headers all right so now let's go and check some customers let's take the customer number two you can see the
country equal to Germany so we have the first through and the score as well higher than the 50 so we have another
true with that we're going to get the output to true that's why we are seeing see the value of the sales at the output
so let's move to the next one we have the customer number three you can see the country is not Germany so we have
here France so the first condition going to be false and immediately the output going to be false because both of them
should be true but we can check the second value you can see the score is as well not higher than 50 so both of them
fails and the output going to be fail as well so that's why we are getting empty we are not getting the sales all right
so now let's move to another customer number 23 you can see the customers comes from Germany so the first
condition is fulfilled so we have our first through but the score is not higher than 50 so the second condition
failed that's why we didn't get any results so as you can see the end operator is very restrictive everything
should be true in order to get their results so that's it this is how the end operator
Works let's move to the next example where we want to show the sales only for the customers that they come from
Germany or the score is higher than 50 so the logic is very simple right but here we have to change the operator on
how we are combining those two conditions so we're going to have the same thing that's why I'm going to go to
the sales and and let's duplicate it and then we go and edit it so we're going to change the name to or and we have the
same conditions if the country equals to Germany but this time or the score is higher than 50 so that's why I'm going
to go over here and let's change it to our operator so now I would like to mention something that those logical
functions are very close goes to the English language so if you just read this code it's like you are saying a
sentence in English so what you are doing here is if the country is equal to Germany or the score is higher than 50
then show the sales that's it so you see it's like translating the English sentence to a code and it's really easy
to write and to read as well so it's really logical so now let's back to our calculation you can see it is valid
let's go and hit okay and immediately we can see in the view that with the or operator we are getting more values than
the andt because the ad is very restrictive so now let's go and check some customers you can see the first one
we have the country not equal to Germany so come from France the first condition failed so let's have hope for the next
one but the score is higher than 50 so that means this customer going to fulfill the requirements it's enough to
have only one true so that's why we have the sales in the output the next customer fulfill both of the conditions
come from Germany higher than 50 that's why we have the sales like the anend operator but the Third customer as you
can see the first condition fail because France and the second as well failed because the score is not higher than 50
that's why both of them are failed and we don't have any results we have to have at least one through to get
something at the output so that's it this is how the or operator works all right so now we have the following task
for you is to show the sales for only customers who either come from Germany or France you can pause the video now in
order to complete the task and once you done you can resume it okay so let's see how we can do that we're going to go and
create a new calculated field we going to call it s else country and we're going to start with
the F statements then we have the two conditions the customer should be either from Germany or France so the first one
going to be the country equal to Germany and the operator going to be or so the customer could be either from
Germany or France so country equal to France so what can happen if one of those conditions are fulfilled we can
have the sales then sales and that's it let's end it so as you can see very simple let's go and hit okay so as usual
we're going to go and check the values so let's drag and drop it over here in the view we have it here in the middle
let just make it a little bit bigger and see the customers so now we are checking only one field but in two conditions so
either the country France or Germany so the first customer we can see come from France we're going to get the value the
second one as well we're going to get the sales value France USA we will not get any value because it's not part of
the condition so as you can see now we are getting the sales of all customers that come either from France or Germany
okay so now I'm going to show you quickly something let's go back to our calculated field Sales Country and go
and edit it so now instead of having or we're going to use the operator and so now what we are seeing is the customer
should come from Germany and at the same time from France so it sounds weird right so let's go and try it let's hit
okay and check the results you can see that the sales country is completely empty so we don't see any values because
in our situation the customer should only come from only one country so we cannot have this condition so logically
from the data perspective this is not possible all right guys so with that we have learned the end or operator let's
move next to the not operator okay so now we have the following task show the sales of all
customers who don't come from Germany so if the customer come from any other countries we're going to see the sales
in the view but if the customer from Germany it should be null all right so now let's go and create a new calculated
field we're going to call it sales not Germany and we're going to have as well the F statements so now we have two ways
to do it so the first option and the long one where we're going to go and create a condition for each value inside
the country beside Germany so we're going to do something like this so country equal to USA and then we're
going to say or country equals for example Italy and then for the next one or country equal France so as you can
see I'm creating a condition for each value from the dimension country so of course if you have a long list of
countries you're going to end up making a lot of conditions and as well what can to happen if a new country enters inside
your data source what going to happen you're going to always go to the calculation and add it as a condition so
in this option we are including all the values that we want to see in The View but there is better way to do that where
we're going to exclude only Germany so let's go and remove everything from here so we're going to say if the country
equal to Germany and this time before the condition we're going to add the operator nut so here we're going to go
and reverse everything so if the customers don't come from Germany what going to happen we're going to show the
sales then sales and that's it so as you can see it's very short and simple we are just excluding one values we don't
have to add all the values we don't have to be worri about if there's like a new country value inside the data source
anything not Germany we're going to show the sales so let's go and check the values I'm going to go and hit okay so
now as usual we're going to get a new calculated field in our data source let's drag and D it to the view to check
the values just make the head a little bit bigger to read it then scroll up and the first customers come from France
we're going to get the sale informations the next one from Germany we have null here we have as well the customer five
from Germany six as well from Germany we don't have any sales informations so with us we can see that all the
customers that don't come from Germany have the sales in this field so as well we can check that by sorting the
countries let's sort it like this and all those values from France we're going to get always sales
informations and if we go to Germany you see all the customers from Germany don't have any sales informations in this
field so they you say we're going to get again the values so as you can see it's very easy to to use and really useful to
make filters and so on and as well to focus in specific group of customers in our views so that's it about the three
operators they are really nice to use all right everyone so that's all for the logical operators and with that we have
covered all eight logical functions in Tableau they are really important functions since it's going to help us to
make datadriven decisions in the analyzes and with that we have covered the last group of functions under the
category roow level calculations we learned around 40 Tableau functions and next we're going to learn about the
aggregate calculations in Tableau all right so now we're going to talk about the second type of
calculations that we have in Tableau the aggregate calculations and I split the functions into two groups the first
group going to aggregate the measures in our data source so we have the sum average count and so on and the second
group where we can aggregate the dimensions of our data source and here we have only one function we have the
attrib so now we're going to focus on the first group how to aggregate the measures in
Tableau all right so the first question is what are aggregate calculations in Tableau if you use those calculations
you're going to aggregate the rows of the data source and put the result at the visualizations level of the details
so that means the dimension that you are using in the view going to control the granularity of the measure let's have a
quick example in order to understand it so let's say that we have the orders table inside our data source and we
would like to find the total sales by the products and in this example the sales is a measure and product is the
dimension so in order to find the total sales we're going to use the function sum in Tableau so it going to look like
this we going to use the sum of sales and in the view we're going to have one dimension the product it is the one
going to control the level of details in the view and then we have the result of the function sum so we're going to put
here the results of the aggregations so now with this table we're going to go and group up the rows of the orders by
the products so as you can see the first group is based on the product number one then we have the second group for the
product number two three and four so as you can see the orders now is divided into groups and at the visualization
levels we going to have exactly only one row for each group so that means for the product one we're going to have only one
row and then tblo going to go and summarize all the sales inside this group so at the end in the result we can
have the value of 40 so as you can see the aggregate calculations is grouping up the rows from the data source and
present it as one row at the output in the visualizations then tblo going to move to the next group for the pay2
we're going to have only one row and the summarizations of the sales going to be 50 and the same thing going to happen
for the product 3 we're going to have here two rows and the summarizations of that going to be 45 and as well for the
P4 we have as well one row in visualizations with only 15 as a total sales so as you can see the aggregate
calculations is going to go and group poop up the rows of the data source and present it as one value in the
visualizations and the level of details going to depend on the dimension that is used in The View that's why we say that
aggregate calculations can to bring the data at the visualization level of details and it's not like the functions
in the roow level calculations where we have computed each value on the same row so we didn't group anything the number
of rows going to stay exactly like before so this is how the aggregate calculations works and we don't have
only one function we have here multi functions so the first one we have the sum that we just learned it can return
the total sum of all values within a field and then we have another one the average it's going to return the average
of all values then we have the count it's going to count the number of values within a field then we have another very
similar function called count D this time we're going to count the number of unique rows within a field then we have
the Max and Min it going to return the maximum value or the minimum value within the field and now if you check
the syntax of the those aggregate functions it's going to be the easiest if you compare it to any other functions
they all follow the same pattern so they always start with the name of the functions for example the sum average
count and so on and they all accept only one field so as you can see we have the sum of sales average of sales and so on
so we have only one argument and it's very simple so now let's go in Tableau and start practicing those aggregate
functions okay so back to our small data source let's go to the product and as as usual we're going to get the category
and as well the product name so now those two Dimensions going to define the level of details and the product name
going to be the one that is controlling so here we have the five products inside our data source and now in order to
create aggregated calculations in Tableau there are two ways either you're going to do it locally directly only for
this view or globally by creating a new calculated field and it's going to be available for all other worksheets so
now let's go and check the first methods where we're going to go and create a quick aggregated calculation so we're
going to go to the orders and we're going to take the sales so just drag and drop it here on The View and now as you
might already notice that tblo always try to aggregate the data at the visualizations and for that t going to
use the aggregated functions so as you can see we have the sales but before it we have the sum of sales so that means
Tableau is using the function sum in order to aggregate data in the view and this is the default method from Tableau
to aggregate the data so that means in tblo the default type of calculations that can be used on the measure is the
aggregate calculations and the default functions that's going to be always be used is the sum and now in order to
change the function that is used in the aggregations we can go to the measure over here right click on it and here we
see that our field is a measure and using the sum function in order to change that let's go to the measure and
we can find here a list of all different aggregate functions that we have in Tableau so we have the sum the average
the count count distinct minimum maximum and so on so now for example we can go over here and change it to the average
so now instead of sum of sales we have average of sales and at the output we're going to get the averages so as you can
see it's very simple with just one click we change the aggregations function and as well it doesn't need a lot of
configurations like we're going to see later in the table calculations for example or the LOD Expressions so this
one is really easy if you want to change the function just go to the measure right click on it and then here you have
a list of all functions that you can configure and of course anything that I'm choosing now from those functions
will not affect any other sheets and will not affect our data source so here we still have the sales we don't have
here any field called the average sales so it's going to be only locally available for this visualization and
that brings us to the second method where we can create an aggregated function that is globally available for
all other worksheets or workbook connected to the data source all right so now let's say that I
would like to have an extra field inside my data source to find the total of sales in order to do that we're going to
go and create the new calculated Fields it's really simple we're going to call it total sales and then in order to see
the aggregate functions in Tableau we can check the documentations over here so let's go to all and then let's choose
Aggregate and with that you can find all the aggregate functions in Tableau inside it you can find as well the LOD
Expressions so we have here the fix include and so on so in order to find the total sales we're going to have the
function sum and as you can see it need one expression it going to be the sales so it's going to be only one fi so we're
going to have the the sales and that's it so as you can see the calculation is valid and let's go and hit okay and with
that we got a new continuous measure inside our data source but here the difference between aggregate
calculations and the RO level calculations that those calculations going to happen on the Fly where the RO
level calculations going to store the data inside the data source so that means if you go and check the data
source data or if you view the data from here you can see that we don't have any informations about the total sales so
now if you browse the data we don't have any extra field called total sales so because those informations will not be
pre-calculated from Tableau and stored inside the data source it can happen on the fly as you bring the field to the
visualization so that means tblo will not go immediately and execute the aggregate calculations as you are
creating them and then put the result in the data source tblo will do it in the fly and that's because Tableau doesn't
know the level of details that you need at the visualizations as you know the data source has the row level of details
so that's why only one type of calculations the RO level calculations can be
pre-execution will not store inside the data source any data the data going to be calculated
once you drag and drop it inside the view so it's going to stay empty as long as you don't use it so let's go and
close this over here and let's drag and dve it to the view to check the results and now in this view we got the total
sales by the products because the product name going to control the level of details let's say that you would like
to have the total sales by the category in this view you have to remove the product name so in order to do that
we're going to go and remove the product name from The View and with that we got the total sales for each category so
that means the aggregate calculations or the granularity of the measures going to depend on the level of details of the
visualizations the dimension going to control everything going to control the level of details that we see in the view
so now let's go and understand how tblo brought those numbers to the view okay so in the data source we have 15 orders
and in the visualizations we said okay we would like to have the category so tblo going to go and get the category to
the visualizations and inside there there are like two values so we're going to get the accessories and the monitor
so we're going to have with that only two rows then we're going to have the sales the total sales so tblo going to
go and aggregate the sales for each category so as you can see tblo going to go and split the orders into two groups
the one with the category accessories and the other one with the monitor now in order to find the total sales of the
accessories table going to go simply and go aggregate all those values of the sales and put the result at the output
so the first one going to have like around 2377 and for the next group tblo going
to do the same so going to go for all those orders underneath the category Monitor and go and aggregate all those
values so with that we're going to get around 4,129 so as you can see tblo going to go
and split the rows by the Dimension that is used in the visualizations and in this example it's going to be by the
category so it's going to split it into two groups and then going to go and apply the aggregate
functions okay so let's move to the next one we would like to find the average sales for each category in order to do
that we're going to go and create a new calculated fields and we're going to call it average sales and the function
is very simple so it is the AVG the average and then we're going to have our field sales and the that's it it's
pretty simple so let's go and hit okay and as usual we're going to get a new empty field inside the data source but
once we drag and drop it on The View the calculations is going to happen so let's do that so with this we can find the
average sales for each category and have t did the calculations it's very simple TBL going to split again the RADS inside
the orders into two groups the first group for the accessories so it's going to go and add up all those values inside
the sales and then it going to divide it by the total number of orders inside this category so here we have around
eight orders so their final value going to be around 297 the same thing going to happen for
the second group so table going to go and add up all those values then divide it by sevens because we have only seven
orders for the Monitor and we will get 590 as a result so here we can see again that the dimension category is deciding
how the calculation going to happen and as well how the data going to be split up so that's all for the average
function let's move to the next one we have the count let's say that we would like to find the
number of orders for each category in order to do that we can go and create again new calculated field and we're
going to call it number of orders and the function is really simple so we're going to use the counts and inside it we
need only one field this time we're going to go and count the order IDs so in order to do dots we can go and use
the order ID and that's it so we are counting how many orders IDs we have inside our data Source the calculation
is valid let's go and hit okay as usual we're going to get a continuous measure in our data source let's go and drop it
to the view and check the results we can see that in the accessories we got eight orders and on the monitor we got seven
orders so now let's see how tblo is doing that it's very simple again our data is splitted into two groups and T
going to start simply counting the rows so how many rows do we have inside the accessories it's going to be eight rows
so we have here eight orders and if you count the rows of the monitor you will get as well seven orders so with the
count function we are just simply counting the rows so that means in the accessories we got eight rows and on the
monitor we got seven orders there is one more special thing about the count let's say that inside our data we got nulls
let's say that we don't have here any order ID it's empty it's null so what going to happen here Tableau will not
count it so in this example Tableau going to go and count only six so here instead of seven we're going to get six
and this as well going to affect the previous function that the average as we learned before it's going to go and add
up all those values and then it's going to divide it by the number of orders so let's say that we have here a null this
time Tableau will not divide it by seven Tableau going to go and divide it by six and here again a reminder that we have
to handle the nulls inside our data as we learned before using the ZN or is null if null and so on so if we divide
it on six it's going to be different than dividing it by seven which is more correct so here we have seven orders and
not six orders so that means pay attention if you feel that you are doing the Aggregates on top of it whether it
has nulls or not because having a null here we're going to get in acccurate results we don't have six orders we have
seven orders inside the monitor all right so that's all for this function the
count all right so now we're going to move to a very similar function in Tableau called the count D it going to
return the number of unique or distinct values within a field it sounds very similar to the counts but here we have a
difference between them where we are counting only the distance values let's have an example in order to understand
that difference we would like now to show the number of product for each category let's go and create a new
calculated field and let's call it number of products and this time I'm going to start first with the function
counts to show you the differences between them and we're going to use the filled product ID let's go and select
that and then hit okay again we got a new calculated field let's show it at the result and we can see that the
results is very similar to the number of orders so here again we have eight products for the accessories and seven
products for the monitor so now what happened here well if you check the data inside the order we got only two
products with the accessories and as well only two products for the monitor so why we got eight and civil and that's
because tblo going to go and count the number of rows whether it's like duplicates or not it doesn't matter so
tblo going to go and count okay here we have eight rows that means we have eight products so that's why we cannot use the
count function for this task we have to use another thing where we're going to use the count D so let's go and change
it I'm going to go to the calculated Fields edit and just add a d after the count to use the next function so we
have count product ID let's go and hit okay and as you can see in the result now we got two for the accessories and
two for the monitor so let's see how tblo going to work here tblo going to count the distinct or unique values
within a field so this time table going to pay attention to the content of the field so it's going to start counting
okay here we have uh the USB mouse so this is one then the next one we have the same information so table will not
count it at all the same for the third then for the fourth order we have a new product so here we have a new value the
logistic keyboard so here we have two then move on to the same stuff so here we have the same values tblo will not
count them so at the end tblo did Count here two unique values so here we have two products for the the accessories
that's why tblo going to go on the output and put two for the next category so we start with the same so we have the
LG full HD monitor this is one product the second one is the same value so will not count it then we move to the third
one as you can see it's new products new value so it's going to count two and the rest will not count anything because it
as well duplicates so T going to go and count the number of uniques values within a field that's why we can have as
well here a two which is more accurate we got only two products for the accessories and only two product for the
monitor so this is the difference between count and count D count will just blindly go and count how many rows
do we have inside each category but count D going to go and check the content and it going to count only the
unique and the distinct values all right so now we're going to move to the last two we have the Max and
Min they are very simple functions in Tableau the max going to find the highest value within a field and the men
going to find the lowest value within a field let's go and check how it work so let's say that we would like to show the
highest sales for each category in order to do that we're going to go and create a new calculated field let's call it
highest sales and then we can use the max function and we have the sales it's very simple it always needs one field so
that's it let's hit okay and let's check the results let's put it on The View so here we can see the highest sales inside
the accessories is the 525 and the highest sales for the monitor is the
1,691 so let's see how this works as as usual our data is split it into two groups we start with the first group so
table going to go and check all those values what is the highest values inside those sales it's going to be the
525 so T going to present it at a result then we're going to move to the second group so table going to take all those
values and compare it to each others in order to find the highest value and it going to be this order number two as
highest sales inside our data for the category monitor so that said this is how the max function work in tableau
let's go to the next one to find the lowest sales for each category so we're going to do the same stuff we're going
to have new calculated field lowest sales and this time we're going to use the function Min and then our fi sales
so that's it click okay and let's present it at the result as well to compare it so we can find the lowest
sales in the accessories is 56 and the lowest as well for the monitor is 40 so the same thing TBL going to go and check
all those values for the first group what is the lowest sales as you can see it's going to be this order order number
10 it's going to be the lowest value and then tblo going to go and check those group of values in order to find the
lowest value it's going to be this one the 39 tblo is just rounding the numbers that's why we have here 40 but in
reality it is um 39. 97 so that's it this is how the Max and Min Works in Tableau as you can see
the aggregate functions in Tableau are very simple those functions like I think this is my easiest tutorial that I made
in the Tableau series all right guys so that's all for these six functions in order to aggregate the measures of our
data source next we're going to talk about how to aggregate the dimensions using the very confusing function the
attributes all right so now going to talk about another aggregate function in Tableau but this time this function
going to be very special and it is very confusing a lot of people get confused about the attribute function in Tableau
so first as usual we're can to understand the concept behind it and then we're going to practice in
Tableau previously we have learned that the aggregate function is going to go and aggregate the numbers the measures
inside our data source this makes sense right to have the total sales in the view but now how about to aggregate the
values of the dimensions for example the customers or the products how to aggregate those values we cannot go and
use the sum function in order to aggregate the dimensions we can go and use the attribute function so the
attribute function in Tableau going to go and aggregate the values of the dimensions of the data source and
present the result in the view but this time I would like to go and aggregate the values of the customers by the
products so in order to do that we can use the function attribute for the customers and in the view we can have
two values so first we have the dimension product this one going to define the level of details of this View
and here we have another field where we're going to have the result of aggregating the customers so the
attribute of the customer here we have two options the first one if all values are same then it's going to return a
single value the same value or if we have multiple values then it going to return srisk this might sound very
confusing or complex but don't worry about it let's just follow the example so again here since we are grouping up
the data by the products tblo going to go and group up the orders by the products so the first group for the
product number one the second group for two and so on and in the visualizations we're going to have only one row for
each group like any other aggregate functions so now for the first group we're going to have one row the pay one
and Tapo going to go and check the values inside the customers for this group so as you can see we have the same
informations in those three rows so we have John John JN so we have the same value so we are at the first options if
all values are the same then it going to returns a single value that's why table going to return in the output Jone so
with that tblo did implement the first option let's go to the next group so the pay2 as you can see in the customers and
the pay2 we have here different values so the first one is Joan the second one is Maria Maria so we don't have same
values right we have different values that's why tblo going to go and execute the second option because we have
multiple values and table going to return asterisk so that's why we have here an asterisk other results so this
is how the attribute function Works in Tableau let's move on to the next products let's see that we have the P3
and as you can see we have have here again two different values John and Maria they are not the same that's why
the second option going to be activated and table going to have the asterisk other results for the product four let's
check we have Maria and Maria so we have the same value that's why table going to go and execute the first option where
all the values are same and then we're going to get the same value in the output that's why we have Maria so
that's it for the attribute function it's really simple right once you have an example then everything going to be
clear so again if the values are the same like here John then you're going to get the same value and if the values are
different so you have multiple values then table going to have the EST and now you might ask what this asteris means in
the view well Tableau use it as a highlight or warning for you to tells you there are more details in this field
inside the customers and the as can help you as well to understand the relationship between Dimensions between
for example the customers and the products as you can see for the product two we have multiple values so it is
like one to n relationship but for the product one we have one to one relationship so we have only one
customer for only one product and with that you can to understand the relationship between Dimensions all
right so with this we have understood that in Tableau we can of course aggregate the measures like in the sum
function but as well we can go and aggregate the dimensions inside the data source using the attribute function in
Tableau so this is the main task that we usually use the attribute function to aggregate the dimensions so now let's go
back to Tableau in order to practice this function all right so now I'm going to show you a
very quick example on how to create the attributes in Tableau so let's stick with the small data source let's go this
time to the customers we're going to take the countries and the cities as well to The View and now I would like
this example to go and aggregate the dimension City inside this view so in order to do that we can use the function
attribute there is two ways to do it either globally and locally as usual locally only for this view globally for
all other worksheets so let's see the quick one the local one in order to do that we go to the city over here right
click on it and then you can find this option between the dimensions and measures this time we have the
attributes again this is not the third option of the metadata that we learned before dimensions and measures this is
simply an aggregate function that Tableau just put it between those two options so it is not the third option it
is an aggregate function so let's go and click on that so now we can see from the name of the field we have the function
attribute applied on the field City and the level of details in our visualizations is not anymore the city
like before it is now the country so the city going to have an aggregated value so for France we have Paris for Germany
and USA we have the srisk so let's see quickly how Tableau did that okay here is very special about the attribute
function in Tableau it's not like all other aggregate functions where we start from the data source here we start from
the visualizations so depends on the visualization level of details that we have inside the view it's going to do
the calculation so here we have at the visualizations the country and the city so it's going to focus only on those two
dimensions and at the start we have France Paris and we have two valleys for Germany and two valleys for USA since
the country is the only Dimension that we have in the view and the city going to be an aggregation the level of detail
is going to be the country that means we're going to have only three rows only three values so tblo going to show us as
we can see here on the left side that we have France Germany and USA so now as we learned T going to go and check the
value vales if all values are the same we're going to get the same value so for France we have only one value so it's
going to be the same value tblo going to go and put it at the output then the next one Germany we have this group of
rows so we have two rows Berlin and stard we have two different values that's why tblo going to go and put the
asterisk at the output the same for the USA as you can see we have here two different values so we have multiple
values and for that t going to show as well the srisk and the outputs and that's why we have here only pares
France and two asterisks for the other two countries so as you can see this is very simple let's go to another example
to understand the use case of the attributes all right everyone so now you might ask okay nice we can now aggregate
the dimensions but where do I use it in my dashboards so what are the real use case for the attribute functions in
Tableau well usually I tend to use the attribute functions in two use cases the first one inside the tool tip where I
want to show for the users more details about the aggregations let me show you how I usually do it let's go to the big
data source and then we're going to go to the customers let's take for example the country the city all informations
about the location and as well the postal codes then as usual we would like to show the sales informations so let's
go to the orders and take the sales to the columns and we're going to show the labels and as well the color of the
sales so now we can see that the level of details of our visualizations is going to be based on the postal code
since it's going to bring us to the lowest level of details let's say that the requirements wants us to have the
level of details of the city and not the postal code so there is two ways to do it either we can go and remove the
postal code from The View over here so with that we got the level of details of the city but now let's see that I still
want to bring the postal code informations to this visual as a details for the users so I cannot just drag and
drop it put it here it's going to split the data right you can see here Paris we have two values so instead of that we
can use the attribute functions in tableau if we still needs to present the postal code informations in this
visualization so as we learned before we can go over here and quickly switch it to attribute or we can make it globally
to reuse it in different worksheets so let's go and choose that we're going to go and create a new calculated field I'm
going to call it attribute postal code the function is very easy it's going to be only the attribute and except only
one fi it's going to be the postal code and it should be a dimension so that's it the calculation is valid let's go and
hit okay so that we got a new calculated field a new dimension let's go and bring it to the view and remove the postal
code now we can understand quickly from The View that the postal code and the city they are almost at the same level
of details as you can see we have always values but only two countries where we have the srisk so we have the Paris and
the Portland so with that we understand the relationship between the postal code and the city they are almost at the same
level but sometimes we have more details so in Paris we have here two different values for the postal code and as well
for the Portland now in order to show those details for the users either you can leave it as like a filled over here
as a header or a better way in order to save some spaces in the visualizations and not show a lot of headers we can
show it in the tool tip in order to do that we're going to drag our field and drop it on the details and then we have
over here this option to configure our tool tip let's go inside it now as you can see we have four informations City
Country sales and our new field the attribute postal code but I would like to rename it in order to make it easier
for the users to read it so it's going to be the postal code informations let's go and hit okay and now as the users are
Mouse hovering on those informations you can see that we have more details about the city we have the postal condom
formations inside it and if we have multiple values like in Paris we're going to have the srisk I usually
explain for the users if you find the srisk it means we have more details about the aggregations which may raise
the Curiosity for the users to go in more details analyzis about the postal codes instead of the Cities and with
that we are presenting the postal code informations even though that our level of details in the visualizations is the
city so this is very common use case for the attribute where you can present more details for the visualizations even if
you have a very high aggregated data at the view and for that we use the attribute functioning Tableau but
sometimes we end up like in most of the situation that the users want to see those informations they want to see
those postal codes and the sales informations for them in order to do that we do the following we go and
create a new sheets and this time we're going to create a view where the postal code is the level of details so all what
we need is the postal code and as well the sales so drag and drop the sales to the view let's just make it a little bit
bigger to see the header informations so that's it let's call it sales by postal codes so this view going to be now
embedded in the original view in order to do that we're going to go back to our view where we have the city as the level
of details now we want to do an embedded worksheet inside this view inside the tool TP so let's go to the tool over
here and let's have a new line and then we're going to go to this menu over here the inserts the first option we have the
sheets so table going to show us all the sheets that we have in this workbook it's going to be the last one sales by
postal code so let's go and hit on that now we have embedded another worksheet inside The View using the tool tip so
that's it it's very simple let's go and hit okay so now let's go and mouse over on those cities as you can see we have
now a table or a view small view inside the tool tabe so if you go to Paris now we see now the two postal codes and as
well the sales of those postal codes so this is how I usually do it as a next step if the users want to see more
details but of course this needs more calculations and more resources in Tableau to put one view in another one
if the users are happy with the Asis then stay with the attribute but if they need more details then you have to
create another view and then put it inside the tool tip all right guys so that's it for the first use case we use
the attribute to show more details for the users if we have a high aggregations in the view and we use it usually in the
tool tip all right guys so now let's move on to the second use case where I usually
use the attribute functions in my project is to check the data quality inside the data sources usually if you
are working with the data you have some expectations about the data quality and if you have any suspicions we can use
the attribute functions in order to investigate the situation for examples let's say that the expectations in our
data to have only one country for each customers so the data should not allow for some reason to have multiple
countries for each customers if you are skeptical about this informations or we want to check the quality of the data
that we get we can use the attribute functions like this so we can go for example and take the customer ID we can
take the first name last name but now we would like to check the quality of the country but since we have a lot of data
inside our data source it's going to be really hard now by just checking the values to understand whether we have
multiple values for each customers or is it onet to one relationship instead of that we can go and aggregate the country
using the attribute function so let's do it this time by the quick way so right click on the country and let's apply the
attribute function at the start you might see okay nothing is changed but now instead of quickly to validate the
data we can show it as a filter so right click on the country over here and show filter so now on the right side table
going to show us all the possible values that could happen to this view so here we have the as risk we have France
Germany Italy and us say of course what is interesting is the first one so I'm just going to remove everything and
select the asterisk now we can see as we selected the asterisk we don't get any data this is perfect that means the data
quality inside our data is perfect and we have exactly one country for each customers but if we start getting data
from the asterisk it means we have multiple values for each customers and we can investigate this situation so
this is one time analyzes for our data to check the data quality but let's say in the next day or the next month we got
a lot of new customers and we want always to check those informations we can go and make data quality dashboards
for us or for the users to check whether our expectations is correct only selecting the asteris and we can explain
that we expect that this view going to be always empty if this view is not empty then we have a data quality issue
and we can add this information in the title we can call it data quality check then it's about the multiple
countries and this is expected to be empty so if it's empty then everything is fine so that's all
for the Second Use case for the attribute function in Tableau as you can see it's really handy for the project
right to understand your data to do data quality checks and so on or as well to show more details for the users inside
the tool tip all right guys so that's all for the attribute function in Tableau and with that we have covered
many important functions under the category aggregate calculations next we're going to start talking about the
LOD calculations in Tableau they are really interesting and important to understand all right everyone so now
we're going to talk about the third type of Tableau calculations we have the LOD expressions or LOD calculations it is
another type in order to aggregate the data in Tableau and here we have only three functions we have fixed include
and exclude and as usual first we have to understand the concept behind them then we're going to have enough examples
in Tableau so let's go all right guys so now we can understand when do we need LOD
expressions in Tableau using this very simple example so let's say we are building a view where we have the
category informations and the product name and now we are showing the total sales for each products and now by
looking to those two Dimensions you can understand that the product name is controlling the level of details in our
view so we have five products and with that we got five rows so the product name is splitting the rows of this table
but now we come to the issue if you want to show in the same view in the same dimensions and setup sub you want to
show the total sales for each category well we cannot do that as long as we have the product name inside this view
because the product name is splitting the view into products so in order to show the total sales for each category
either you have to remove the product name from The View so by just drag and drop it away you can see now we got the
total sales for each category but if you say wait wait we need to have the product informations in the view we
cannot drop it so let's go and bring it back over here so if you need to have the product name and you still want to
have the total sales for each category we have to use the LOD Expressions so exactly in this situation where we need
the help of LOD Expressions to control the level of details of our aggregations so now let's go further and understand
how LOD works okay so now we're going to have quick facts about the LOD calculations
first LOD calculations going to go and aggregate the rows of the data source at the dimension level that we specify
inside the calculation so that means the dimension of the visualizations will not control the level of details this time
we're going to have the level of details of the L expressions and the LOD calculations like the aggregate
calculations tblo going to go to the data source in order to query the data there and then bring the result to the
visualizations and the calculation going to happen on the Fly that means tblo going to execute the calculation only if
you bring the field to the visualizations so Tableau will not pre-calculate and store the information
inside the data source so again how it works the visualization is going to send a query to the data source and the data
source going to answer with the results so this is how tblo execute the LOD calculations all right everyone we
talked about the level of details many times during the tutorials but now let's understand what do we mean exactly with
the level of details let's say that we use in Tableau only the measure without any Dimensions with that we're going to
be at the level one and we will get for example the to sales if you are using the major sales so table going to go and
summarize all the sales inside the data source and present it as only one row one value so without using any
Dimensions we will get the highest level of aggregations let's go to the next level let's say that we use a dimension
like the category in our small data source we have only two values so tblo going to split this one value into two
values so here we can see more details about our sales it's not only one value now we have it as two values so that
means this dimension going to split our view into two rows moving on to the third level let's say that you use the
country inside the data source we have three countries that's means we going to have three rows and we have more details
now about the sales so as you can see the sales going to split into three rows so that means the level of details of
the category is different from the country in the category we have two rows in the country we're going to have three
rows moving on to the last level if you bring the order ID to the visualizations you will get the highest level of detail
details it is exactly the level of details that we have inside the data source we don't have in our data model
any Dimension that's going to break this rows to more details so we are now at the bottom at the highest level of
details and we going to have exactly 15 rows because we have 15 orders so that means each of those Dimensions going to
go and break the visualizations into different level of details the category going to break it into two country three
product name four order ID can to break it into 15 rows so that means the level of details is the highest at the order
ID and it's going to be the lowest if you don't use any dimensions and the opposite if you are talking about the
aggregations the highest level of aggregations if you don't use any dimensions and you're going to get the
lowest level of aggregations if you're going to use a dimension like the order ID so with that we understood each
Dimensions brings us to a different level of details so this is what do we mean with the level of details in
Tableau all right guys now we're going to go and understand the LOD functions in Tableau but first we can split those
three functions into two categories the first one going to be the static calculations where we have only one
function it is the fixed the second one we have the dynamic calculations and here we have the two functions include
and exclude so if you want to have a fixed or static calculation you're going to use fixed but if you need more
Dynamic then you have to use include and exclude the dimensions inside our visualizations or in the LOD Expressions
Define the level of details and each dimension has different level of details for example the category has only two
values that means the level of details here is very low compared to the order ID where we have the highest level of
details so let's say that our current level of details inside the view is the country so we have the level three we
can use the LOD expressions in order to bring the calculations to a lower level of details and we can use the exclude or
the fixed function to bring it for example to the level two at the category but now in order to present the
calculations in the current View what can happen the Valu is going to be duplicated or replicated like we have
seen in the last use case where we have the tables and we duplicated or replicated all the values or we can use
the LOD Expressions to bring us to a higher level of details like using the include or fixed but now if we want to
bring back the calculations to the current view we have to do aggregations like we have done the average number of
customers for each category since the customers has higher level of details than the category so you have to pay
attention to the D di mentions that you are using inside the LOD calculations if it's going to bring the aggregations to
a higher level of details then you have to focus on the aggregate functions that you are using in order to bring the
result to the current level of details in the view so that means we have always to aggregate data in order to go back to
a lower level of details or to higher level of aggregations so always here we have to use an aggregate functions in
order to come back to the current level of details but if you are on above it's easy it's going to just duplicate the
data and replicate it all right guys so I hope that was clear this is one of the most complicated concept that we have in
Tableau if you compare to all other Concepts all right guys now we're going to go and understand the syntax of the
LOD Expressions they start with the function name so either it's going to be the fixed include or exclude after that
we have the double points then we have to define the aggregations it's like the aggregate calculations something like
sum of sales average of sales Max mean and so on but the most usual aggregation that we use here is the sum of something
let's have a few examples we can go with the following like we say fixed then we don't specify any dimensions then we
specify the aggregations so we have in this example the sum of sales now think about the LOD Expressions as you are
building any view in Tableau you always have to specify the dimensions and measures the aggregations so here we are
telling Tableau to do the sum of sales without considering any Dimensions now let's go and add a Dimensions inside the
calculation like for example the category and here again the same analogy it's like you are building view from the
dimension category and the aggregation sum of sales and of course you can go and add more Dimensions like the
category and the product name the same analogy we have two Dimensions In The View category product name and then we
have the sum of sales and now of course we can go and add more Dimensions like the category comma product name so the
same analogy we are adding two Dimensions to the view category and the product name and the aggregation is the
sum of of sales and of course we can go and use another functions like the include or exclude in those examples or
another aggregations like the average of sales and so on so as you can see building an LOD expression is very
similar as you are building any view you have always to define the dimensions and as well the aggregations from the
measures so that's all about the syntax of the LOD Expressions all right so there are two
types of level of details LOD the first one is the one that we Define inside our visualizations we call it LOD Vis and
the other one that we Define inside the calculations we call it LOD Expressions so now let's say that inside the
visualizations we have two Dimensions category and Country and we have the sales and now in the right side in the
LOD if you go and use the fixed function so let's say that we have the fixed category sum of sales so what we have
done here is exactly like you are building any other view you need always a dimension and as well an aggregation
so with that tblo going to go and let's say internally going to create a Hidden View with the dimension category and the
aggregation sum of sales so here since we said it is a fixed function Tableau will ignore the dimension that we have
on The View so it can work completely independent from the dimensions that is presented in the view so that means the
calculation going to be very static and doesn't matter what you're going to do in the visualizations nothing going to
change in the calculation of the LOD expression so what do do I really mean let's say that in the view you have
added a new dimension let's say the product now you have made a change in the visualizations we have now three
dimensions product category and Country but the LOD expression will not change at all it's going to get exactly the
same results it's going to has the category and the aggregation sales so this is the main purpose of the fixed
function to make it independent from the dimensions that we have inside the view so everything going to be static and
this is exactly the main difference between this function and the other two include and exclude so as you can see
building the LOD Expressions it's is very easy it's very similar as you are building visualizations in Tableau as
you are dragging the dimensions and the aggregations here instead you have to Define it inside the calculation and
always we have to define the dimensions and aggregations so it's really simple once you understand it now let's move to
the next one to the exclude all right everyone so now back to our view where we have the product
name in the visualizations and we cannot use the aggregate calculations in order to show the total sales by category in
order to solve this we're going to use the LOD expressions using the fixed function so let's go and create a new
calculated field so we will call it sales by category and now we're going to use the fixed function so let's start
typing fixed and use this suggestion from here and now next we have to define the dimension since we said sales by
category then we need the category so let's add the dimension category and then double point point and the
aggregation going to be the sum of sales and at the end we have to close the bracket so as you can see it's very
simple we have to define the dimension and as well the aggregation that we need in the visualizations so let's go and
hit okay but as usual we will get a new calculated field on the measure and it's going to be calculated on the flies that
means tblo will not go now and stall the results in the data source so let's go and check the results drag and drop it
to the view over here so now we see in the results we have the sales by the category we are ignoring ining the
dimension product name and it is based completely on the dimension category and when I usually work with the LOD
expressions in order to understand it I always imagine that Tableau is creating a separate view in order to calculate
the L Expressions then add it to the current view so let me show you what I mean with that let's go and open again
our calculated field and on the right side we have over here the data source information s t going to go and query
those data so we are saying fixed category so that means we can grab the D di menion category and inside there are
two values we have the accessories and the monitor so next we have the sum of sales this is the aggregations so T
going to grab the sales and start doing the aggregations so it's going to go and summarize all those values for the first
sections for the accessories and we will get the total sales of the accessories and then tblo going to go and summarize
all the sales for the second category and with that we will get the total sales by monitor so the output of our
calculation the LOD expression going to look something like this as you can see the level of details in the LOD
expression is completely different than the view so here we have only two rows and in the view we have five rows the
next step table we're going to go and merge those results to the view so we have the first three products belongs to
the category accessories that's why we are seeing the values the total sales from the accessory in the view and then
the next two products belongs to the category monitor that's why we are seeing the total sales by the monitor so
this is how I usually do it in order to understand the LOD Expressions if things get complicated now one more thing about
the fixed calculations we say that it is static it is fixed so doesn't matter what I'm presenting in the view we will
always get the same results and nothing going to changed in the LOD expression so what I mean with that let's go and
change a few stuff let's take the product name away you can see we still get the same values let's go and add for
example the country to the view so let's go to the locations and just add the countries as you can see nothing going
to change the LOD expression can have exactly the same values and it is static all right guys so that's how the fixed L
expression Works in Tableau all right guys so now we have the following use case I would like to
create a histogram to measure the customer's loyalty that means I would like to have a data distributions of the
number of customers distributed by the number of orders so I would like to understand here what are the number of
orders that the majority of my customers are order in so that means I would like to understand the behavior of my
customers so that means in order to build such a thing we need two measures the number of customers and the number
of orders well before we have learned how to build histograms but only from one measure so if you have two measures
this time we have to go and create LOD Expressions so now let's do it step by step in order to learn how to build such
a visual all right guys so first let's understand the data that we have let's show the number of orders for each
customers so let's go to the customers over here we are at the data source then let's take for example the customer ID
with that we're going to have a list of all customers inside the data source and then let's go to the orders and grab the
order count so with that we got the count of orders for each customers and now let's go and sort the data so we can
see we have only one customers with the highest number of orders 29 then we have three customers that ordered the same
amount so we have 28 three times so three customers ordered the same amount then we have one customer that order
ordered 26 then we have over here five customers that ordered the same amount so we have 25 orders for those five
customers so now since we have two measures the number of orders and the number of customers we have to turn one
of them to a dimension so I'm going to be working now with the number of orders to turn it to a dimension so we want
those values the 29 28 26 25 in order to do that we can go and create an LOD expressions using the fixed function so
let's go and create a new calculated field we going to call it number of orders per customer we're going to go
and build something very similar to this View using the LOD Expressions so we're going to start with a fixed function and
then our Dimension going to be the customer ID like in the view and then our aggregation going to be the count of
orders you can go with that distinct if you are not sure whether there are duplicate inside the orders but I would
stick with the accounts and then we going to have the order ID and then let's go and close it so with that the
calculation is valid so we just build exactly like this view let's go and hit okay so now with that we got our new
field over here the number of orders let's go and check the result it's going to be exactly the same data that we have
inside our view but this time we have an LOD expression where we have more control in this measure so now we're
going to drop everything from The View we just need the new calculated fields and now let's go and switch it to
dimension in order to have distinct values and then move it to discreete so with that we got something very similar
to the bendz right here we have a distinct values from the number of orders now what is missing is of course
here the number of customers in order to have histogram so let's go to the customers counts over here and just drop
it on the rows and with that we got exactly what we want the data distributions of the number of customers
so as you can see over here for example we have three customers that ordered four times and here again we have only
one customer that ordered 29 times if you remember the example and then we have here those three customers that
orders 28 times so with that you can understand quickly the behavior of the customers by just checking the view we
can understand that most of our customers are ordering between 11 and 16 which is really good like we don't have
a lot of customers that are ordering only once so the left side over here is really low which is very good and of
course now we are summarizing all the data that we have inside the data source the five years and now you might have
the question does the behavior of the customer change over the time in order to answer this question you have to
bring the time so we have to bring the order date let's drag and drop bit to the rows over here and now we can see
very quickly that the behavior of the customers are not changing over the time so as you can see the histograms looks
identical right so most of the customers are ordering between 11 and 15 and that's over the years and we cannot do
such analyzis without the LOD Expressions so you can see the power of LOD okay so in the visualizations we're
going to have exactly the same view with the two Dimensions category and Country but now in the LOD Expressions we're
going to use the excludes where we're going to have exclude category sum of sales so now
what we are telling Tableau is to go and exclude the dimension category from the visualization so that means in the LOD
expression on the right side we're going to get all the dimensions from the visualizations and we will exclude now
the category so we going to remove the category from the dimensions and that means on the LOD expression now in this
example we have the country that's going to control the level of details in the LOD expressions and table going to do
the aggregations again depending on this Dimension so that means the exclude function will always remove the
dimensions that is specified in the calculation and here the big difference between the exclude and the fixed
exclude is depending on the dimensions that we have in the view so let's say that we have added in the view another
dimension so now we have product category and Country what can happen to the LOD Expressions Tableau going to
take all those dimensions and will only exclude the category that means the calculation now going to depend only on
the product and the country so as you can see it is very Dynamic and it depends on the visualizations so the
exclude will always react to the dimensions that are specified in the visualizations and going to remove the
dimensions that we specify in the calculation okay moving on to the second LOD function that we have the exclude so
let's say that I would like to have the total sales inside the view but I would like to ignore the dimension category so
in order to do that we can use the exclude let's go and create a new calculated field and let's call it sales
exclude category so we start with the function exclude so let's select that and then we're going to have to specify
the dimension that should be excluded it's going to be the category after that as usual we have to define the aggregate
calculation it's going to be the sum of sales and let's close the brackets so it's very simple we are telling Tableau
to ignore always the category from the calculations so everything is valid let's go and hit okay and as usual we
will get our new calculated field in the data pane let's go and drop it on the view in order to check the results so
now if we check the new results you can see we got different numbers from the sales by category or the original sales
so what is going on over here now since we are using the exclude function in Tableau the LOD calculations going to be
depending on the dimensions of the view so let's open again our calculated field and let's see what table going to do so
table going to depend on the dimensions that we have inside the view so we will have in the calculations the country and
the category but since we are here saying okay go and exclude go and remove the category so tblo going to remove the
dimension category and with that we are left only with the dimension country so since we here have like duplicates and
we have only three countries so at the end in the LOD Expressions we will have three rows so now what T going to do we
going to go and find the sales the total sales for each countries and the data source going to be splitted into three
groups for each country one so we have France Germany and USA so that means going to go for example for France and
go and summarize all the sales for those three orders and put the results at the output then goes for the same as well
for Germany and take all those sales summarize it and get as well in the results the total sales for Germany and
then we have for the USA those four orders and now we're going to go and summarize the sales for that so that the
output of the LOD expression going to look like this we have the country and the total sales of countries so now if
you compare it to the view to the result that we have as you can see as we exclude the category we're going to have
the total sales for each country so here France we have 172 and as well for the second category we have France we will
get exactly the same total sales and the same thing going to happen for Germany so we will have exactly the same values
in both categories so for Germany we will get this value and as well for the monitoring in Germany we will get this
value so as you can see once you understand what is going on in the background you will understand the
numbers in the view so as we say that the exclude is dynamic it is not like the fixed we will not get always those
results it's really going to depend on the views on the dimensions that we have in the view let's take for example let's
add another dimension to the view let's go and get the customers so let's go to the customers take the first name and
let's drop it over here so now if you look closely to the data you can see the fixed those numbers nothing changed
inside it because it's always fixed to the category Dimension but the exclude this time they have different numbers so
if you go and compare do we have at the start at the total sales for countries those numbers you don't find it anymore
in this sales over here and that's because we have added a New Dimensions we don't have only the country we have
as well the first name of the customers so that means now we have in the LOD Expressions two Dimensions the country
and the first name so the result the output of the LOD expression going to look like this we have two Dimensions
country and the first name we don't have the category we exclude it we remove it from The View and then we have the total
s sales for this combination of Dimensions so the total sales for George from France total sales for Maria from
Germany and so on and those numbers are exactly the same that you are seeing in the view so as you can see the exclude
function is dynamic and depends on the dimensions that are presented inside the view so this is how it works now let's
move to the next one we have the include all right so now let's move to the include function it is exactly the
opposite of exclude so we're going to have the same example in the visualizations we have the two
Dimensions category and Country and now we're going to say to Tableau include customer Dimension and we're going to
have the same aggregation the sum of sales so now what we are telling t with this calculation is to add one more
Dimensions to the visualizations to add the dimension customers to the two other dimensions that we have inside the
visualizations so here again it's very Dynamic table going to take the dimensions that are presented in
visualizations the category and the country and add to it a new dimension the customers and the function include
is very similar to the exclude it is dynamic so it is depending on the dimensions that we have inside the
visualizations so again the same example if we go and add one more Dimension the product we will end up having three
dimensions in the visualizations and top low in the LOD Expressions going to add one more Dimensions to the expression
where we're going to have at the ends four dimensions customers product category and Country so that means in
include function we are saying do the aggregations in all Dimensions that we have inside the visualizations plus one
more Dimension that comes from the calculation so it's really easy right so now to summarize the fixed function is
very static it doesn't care about the dimensions that we have inside the visualizations it is completely
independent so it going to stay the same as you are changing the visualizations but the exclude and include they are
depending on the visualizations so exclude going to go and remove one Dimensions from the dimensions that are
presented in the visualizations where includ going to go and add plus one more Dimension to the dimensions that are
presented in the visualizations so with us we have now understanding how those three functions Works in Tableau so now
we're going to go back to Tableau in order to practice those three functions so let's
go all right so now we need more attention about this function the include it is more difficult than the
exclude and fixed so let's have some cfee let's go all right so as we learned before that each Dimensions has
different level of details for example the first name has more details than the country or the category so now comes to
the issue if you want to remove such a details from the visualizations so you want to remove the customers names and
you want to stick only with the category and the country but still you want to introduce an aggregations that has to do
with the customers with a dimension that has a lot of details so for example we want to bring here an aggregation that
shows the aage sales of customers for each country and category but without showing the customers informations as
the dimension so let's go and remove the first name from here so we don't have here any customers informations but
still we want to bring the aggregations to the customers level by calculating the average sales of customers in this
case if your aggregation is based on a Dimensions with a high level of details like the customers or the order ID then
you have to use the function include so let's see how we can do that let's go and create a new calculated field and
we're going to call it average sales of customers we're going to use the function include so so let's select the
include now we have to say to Tableau which dimension can be include in the view So currently we have the category
and the country we would like to add the first name or you can add the customer ID doesn't matter so let's add the first
name and then we have to add the aggregations so this time we're going to use the sum of sales now you might ask
why do we have the sum of sales we are talking about the average well the average is going to be the second
aggregation that we're going to do it on top of this LOD expression first we have to summarize the values that we have
inside the data source and then we going to do the average on top of it so we're going to do it step by step don't worry
about it then we have to close the brackets like this so as you can see now the calculation is valid let's go and
hit okay so with that as usual we get the new calculated field let's drag and drop it to the view we still are not
there because here we have the average sales of customers but the function that is used in Tableau is the sum so we have
to go and switch it to the average function so let's go and do that so with that we got the average sales of
customers for each category and Country so now we're going to see step by step how TBL did the execution of the include
so the include going to depend on the dimensions of the view so we have here the category and the country that means
that going start something like this we have the category and the country The Next Step table going to go and check
the LOD function so let's go and open it again so we are telling Tableau now go and include the first name to the
dimensions that are displayed in the view so tblo going to go and grab those informations the first name and present
in the output so we will have three dimensions first name category and Country so we're can to have something
like this so now if you compare the number of rows of the LOD expressions with the view you can see that we have
now more details in the LOD Expressions since we added the first name so here we have around eight rows but in the view
we have six rows so the level of details of the LED Expressions is higher than the view T going to go to the next step
and say okay we have to have the sum of sales so we're going to have the sales as well over here and T going to go
start aggreg the rows so for example first we have George accessories are France it's going to be only this row
over here we don't have it anywhere else so we're going to have the 91 then we have Maria accessories Germany and for
that we have three rows so table going to go and aggregate those three rows in the outputs we will get something like
this and so on so TBL going to go and start summarizing those values based on those three dimensions and at the end we
will get in the output something like this so with that sto calculated the sum of sales by including the the first name
to the dimensions that are presented in the visualization and here we come to the issue where we have in the LOD
Expressions more details than the view so in order to bring those results to the view we have to aggregate it again
so we have to either summarize it or do the average and so on so we cannot bring those details over here without doing
any aggregations in this example we want to find the average of customers for each category and country that's why we
have used the average function so that means if you are using the include function or you have more details in the
LOD Expressions we have to aggregate the data in order to bring it to the visualizations but in the other hand if
you're are using exclude or fixed and the output of the LOD expression has lower level of details than the view
then what's going to happen we're going to have duplicates for example you can see over here sales by category you can
see we have duplicates so it doesn't matter which function we're going to use summarize or average we will get always
the duplicates the same thing for the exclude we had lower level in details in the Expressions compared to the view
that's why you can see duplicates we have the same numbers over here the three rows they are like repeated over
here for the second category so this is the effect of the LOD Expressions if the level of details in the expression is
higher than the visualizations then we have to aggregate the data but if the level of details in the LOD Expressions
is lower than the view then what going to happen we're going to get duplicates so now back to our example table going
to go and find the average of those values so the first value is going to stay the same because we have it only as
one row so it's going to stay the same but now for those two rows as you can see German accessories table going to go
and find the average of those table values we will get 954 and then for the next row we have accessories USA in the
output we have only one row that's why the average going to be exactly the same the same goes for monitor France the
same value but the next value we have monitor Germany here we have two values so T going to go and find the average of
those two values and will get 433 and for the last one we got only one value that's why we got exactly the same
number yeah as you can see if you get more details as a result from the LOD Expressions things get more complicated
and you have to be careful which aggregations you are using in the visualizations all right guys so with
that we have learned how tblo can execute those three functions step by step so now next we're going to go and
learn real use cases of those functions all right everyone so now in this use case we want to compare the
sales of all categories to the sales of a specific category like here selected one the tables in order to understand
how the sales of the other categories are doing to this specific category so in order to build such a view we have to
use the power of LOD Expressions this time we're going to use the exclude so let's learn step by step how to create
such a view all right so now let's start with the first step where we want to show the sales by subcategory so this is
the easiest one let's go and grab the subcategory to the rows and let's take the sales to the columns and then we're
going to go and sort the sales so let's go and do that now our task is to go and find the differences between each
subcategory with a specific subcategory that tables so for example we're going to go and find the difference between
the sales of phones and the sales of tables so that means in order to find the differences in each row we need two
measures the first measure going to be the sales of the current category like for example the sales of the phone and
the second measure we need the sales of the tables so here we need the sales of the tables to be as well at the same row
so the first measure we have it already right we have here the sales for each category but the second one we don't
have it yet so we need to have for each row the sales of the tables in order to do that we're going to go and create a
new calculated field to have these tasks so let's go and create a new calculated field so let's call it sales of tables
what you want to check now is whether the subcategory the current one is tables if yes then show the sales so
we're going to use the if statements then we want to check the sub Tory if it equals to tables you should write it
exactly like the data that we have inside the data source so what can happen we want to show the sales
otherwise do nothing so we want to have nulls if the subcategory is not tables so what we are doing now is isolating
the sales of the subcategory tables so let's go and hit okay and let's go and bring it to the view over here so with
that as you can see we have isolated the sales of the tables in this new measure but we still have a problem that we
would like to repeat this Val value for each row so as you can see we have it only if the subcategory equals to tables
so now in order to repeat this value for all the rows here comes the trick or the magic of the LOD expression exclude as
we learned before the exclude going to go and repeat the values right so we can go and use this trick so what we're
going to tell Tableau is that imagine that in this view there is no subcategory so what going to happen this
measure going to be repeated for all rows let's go and do that so let's go and create a new calculated Fields we're
going to call it exclude subcategory so now we have to use the listed calculations because if you put
everything in one calculation it's going to be really complicated so now we want to tell Tableau imagine that we don't
have subcategory in our view so exclude subcategory and the aggregation going to be the sum but this time of the new
measure that we created for the tables so some sales of tables and then we have to close it so something like this so we
are telling Tableau exclude the subcategory from The View and do the aggregations so let's see what's going
to happen hit okay and drag and drop to the view over here so as you can see since we have only one value and we are
ignoring completely the subcategory we will get the same value repeated it for each rows so now we have all what do we
need to find the differences right we have the sales of each categor and the sales of specific category the tables so
now we're going to move to the last step where it's going to be the easiest part where we want to find the difference
between those two measures so we're going to go and subtract them let's go and create a new calculated field let's
call it difference and then we can to subtract the first value it's going to be simply the sum of
sales this going to be the first value that we have over here then with our new measure it's going to be the sum of our
exclude function so exclude subcategory and that's it let's go and hit okay and let's drop it to the view so with that
we solve the task we have the differences between the sales of each category and the sales of specific
category the tables and of course you can see the TBL is going to be zero over here because we are sub rracing the sum
of sales with the exactly same sales so it is a little bit tricky but if you understand how the LOD Expressions works
you can really do such analyzes so now let's go and drop everything from here we don't need those substeps so I'm just
going to remove them and now of course we can add the coloring over here so let's go to the measure on the right
side and let's take the measure to the colors and with that we can see nicely the differences between the
subcategories and the tables so now if you wouldd like to highlight the tables since it's our our main category where
we comparing all the others to it we can make the use of the sales of tables so let's switch to this measure over here
to the sum of sales and the marks and then let's take the sales of tables and put it on the colors and with that you
are highlighting the main subcategory so with that you have made really complicated analyzes using the LOD
Expressions all right everyone so now we're going to talk about the last type of calculations that we have in Tableau
the table calculations and here we have different functions like the running window rank first last index lookup
we're going to talk about all those functions in this tutorial so as usual first we're going to understand the
concept behind the table calculations then we're going to go back to Tableau in order to start practicing so let's
go the first question is what are table calculations well they are calculations that's going to be executed or performed
after the aggregation is done on the visualizations so they're going to like aggregate the aggregations in blow and
it's important to understand the level of details it's going to be depending on the visualizations so that means here
again the dimensions in the view going to control the level of details and now to the big difference between the table
calculations and the others the calculations going to be performed on the data that we see in the view so
Tableau will not go to the data source and query the data tblo going to query the data that is presented in the view
so that means the view going to be querying the view itself it's going to send a query to the data inside the
visualizations and the view going to return the result back to the view itself so we are not going back to the
data source everything going to be CED inside the view and the other three type of calculations like the aggregate
calculations LOD and Ro level calculations they always going to query the data from the data source and bring
the result to the view only this type of calculation going to query the data in the
view all right guys in order to create table calculations we have to Define two two things first the scope second we
have to define the directions the scope means which data can be included in one calculation for example we have the
following view it looked like a table right so we have here rows and we have multiple columns but here we can see
that our data is splitted by groups each group going to be defined by the dimension quarter so we have the q1 Q2
Q3 and Q4 so now the first option that we have is the whole table that means the calculation can include everything
inside this table it will ignore any part that we have inside this table so it's going to start from the first value
and it's going to end up by the last value moving on to the next scope or to the next option we have the pain this
time the calculation going to focus on smaller scope this time we're going to focus on the partition or the group of
data which is defined by the quarter so that means the table calculations is going to be done for each group
separately so we going to have for those three rows calculations then we're going to move to the second group to the third
group and so on moving on to the last scope we have the cell so it's going to be only one value inside the view the
scope going to be very small including only one individual value so here we have to Define for Tableau the scope of
the calculations is it going to be the whole table or only the pane only the group of data or only one cell all right
the next thing that Tableau needs from us is the direction of the calculations how the calculation going to move
through our table so here we have four different options the first one going to be down that means we're going to start
from the Top Value and we're going to move down until we reach the bottom and that's of course course going to depend
on the scope whether we are running the whole table or only a group of values like we have in the pane and in this
example we have the table down that means we are processing all the values in one calculations from top to bottom
then it's going to reset and move to the second column and we're going to do the same thing for the next year so that
means this time the calculations is moving through the columns in one go so it start from the first year and it end
up with the next year then it can reset and start for the next row and so on so we are moving from left to right so
those two methods are the basics either you're going to move down or you're going to move right the next two
directions it's going to be mixing those two methods so the first one going to be down then across so that means first we
have to go down through the table and then we have to go across so it going to start from the top first then go to the
bottom but this time it will not reset and move to the next column it's going to continue doing the aggregations so
it's going to go to the right across then it's going to move again from top to bottom then across top to bottom
until we reach the last value so that means here we don't have any resets it's going to continue the calculations
through all values it's not like the first two methods where we have resets for each row over here or for each
column this time the starting value going to be the top left and the last value going to be the bottom right
moving on to the last direction that we have I think you got it already it's exactly the opposite first we do across
then we're going to do down so here again there is no resets we're going to start with the first value on the top
left left and then we go to the right first then we jump to the next row then we go to the right we jump down right
until we reach the last value on the bottom right so that means the calculation first going to move right
and then it going to jump down to the next row all right so as you can see it's not that hard once you get it we
have four different directions and three different Scopes that sto needs from us in order to create table
calculations all right guys in Tableau we have different methods on how how to create table calculations depend on the
difficulty the first method that we have is the quick table calculations so as the name says it's very quick and easy
to create so here we have a list of different table calculations and you don't have to configure anything you
just have to click on the function that you need and table going to do the rest so here we have a very common table
calculations like the running total the difference rank moving average and so on the second method is going to be not
that quick we have to configure a few stuff but still we are not writing any functions or any calculations still we
are clicking around but here we have more options and more control to configure the table calculations if you
compare to the first one the first one is just selecting the function and that's it so here again we have very
similar functions we have the rank running total moving calculations and then we can Define different options
like the scope which Dimensions going to control the table calculations and so on moving on to the last method on how to
create table calculations we can do it by creating a new calculated field and then use the functions that are used for
the table calculations and here we have a list of many functions that you can use in order to do table calculations
but they are a little bit harder if you compare to the first two methods in order to create table calculations so as
you can see as you are moving from left to right things gets harder but with that you are getting the full control
and the full options and next we will go back to Tableau in order to try those three methods and we're going to try a
few functions that we have inside the table calculations all right guys so back to Tableau let's
go to the big data source let's go to the product and get the usual stuff so we're going to get the category
subcategory and the sales as usual to the sales over here so now I'm going to show you the different methods on how to
create table calculations and we're going to start with the first one we have the quick table calculations which
is the easiest one in order to do that we're going to do it on The View so it's going to be only locally available for
this view it's not like creating new calculated field so we're going to go to our measure over here right to click on
it and then here we have two options the first one says add table calculations and the second one going to be quick
table calculations the first one is the middle one that I showed you previously in the presentation where you have to
configure different stuff but the second one is the easiest one and the quickest one where we can create table
calculations with only one click so now let's go and check the quick table calculations if you go over here you
will find a list of different table calculations and we can go over here and let's check check for example the
running total so click on that and here there is two things to be noticed first the numbers here changed because here we
have different aggregation functions and as well we have here a new icon in the measure tblo here wants us to quickly
identify whether the measure is using aggregate calculations or a table calculations so if you see the triangle
that means this measure is using table calculations so as you can see with only one click we have created table
calculations here we have the running total don't worry about it I'm going to explain it step by step later well now
you might say you know what we didn't Define anything the scope the directions for the calculations so how we can do
that if you go back to our measure to the table calculations right click on it and you can find now we have more
options once we convert it to table calculations and exactly here the Computing using we have those options so
here we can Define the scope table pain sell and as well the directions and as well you can see that we have different
options like clear table calculations if you want to remove it back to the aggregate calculations so once you do
that you can see we got back our sum of sales without the icon well that means we are not using anymore the table of
calculations we are using now the aggregate calculations so that's all for the first method how to quickly create
table calculations in Tableau but we don't have a lot of options to configure that's why we have the second method
where we have more options to control the table calculations but again we're going to create it locally only for this
view so it will not be available for the data source all right so before I show you how to do that we're going to get
one more Dimension to our view so let's get the years of the order dates and I would like to have only three years so
I'm going to show it as a filter I'm just going to remove the first two years in order to have fewer data in the view
so now in order to create table calculations only for this view with more options we're going to go back to
our measure the sum of sales currently it is an aggregate calculations but we want to convert it to table calculation
so right to click on it and this time we're going to move to add table calculations for the first option so as
you can see we have this small icon indic get this is table calculation so click on that and we will get a new
window here to configure our table calculations so what do we have here the first thing that we have to Define is
the type of calculations so we have here a menu of different functions for the table calculations again here the
running total the rank differences and so on so let's stick with the first one the differences from so here we have to
Define for Tableau two things the scope and the directions and they are always together they are not splitted as
options so the first one going to be table across and Tableau here did really great job by highlighting how the
calculation going to work so as you can see Tableau here highlighting with the yellow color how the calculation is
going to be performed it just to help you to understand how it's going to work it's really great so we have the table
across from left to right then we have the table down from top to bottom and then we have the option of across then
down and as you can see it's going to affect the whole table since we move from the top left to the bottom right
then we can Define the other scope like for example the pain down so as you can see now the scope is smaller compared to
the table down so now the table down include everything in this column but the pain down can to include only this
group so as you can see our view is split into three groups based on the category so we have the first group over
here the second and the third and Tableau is highlighting the first group so it is like a partition and another
option we have the cell where T going to highlight only one value or we can define specific Dimension to do the
calculations so here we have a list of all Dimensions that we have inside the view and you can go and select what the
scope going to be whether it's going to be the subcategory or the year of order date then each function that we have has
more specifications for example here what are the values that are relevant for this calculation again don't worry
about it I'm going to explain how the difference work as well in Tableau so here we do have to define whether it's
the previous next first and so on so each function in Tableau has different options so for example if you go to the
rank you will find over here we don't have now those previous Nicks and so on but instead we have different options to
configure their rank so each Tableau calculation function here has different set of options to be configured all
right guys so that's all for this method as you can see we got more options compared to the first one let's go and
close this and let's say that we are interested to have this calculation for all other worksheets so we want to reuse
it in order to do that we're going to go to our measure and just drag and drop it here on the datab Bane and with that we
got a new calculated field so this time we are using the rank of sales so I can go and rename it Rank and sales and with
that we got a new field in our data ban and we can reuse it in different worksheets all right guys so now we're
going to move to the last methods in how to create table calculations in Tableau we're going to go and create a new
calculated field and use functions so let's go and do that we will start with the function index so let's create a new
calculated fields we can to call it index and the syntax is very simple so start with index and that's it we don't
need to specify anything for this function so as you can see the calculation is valid let's click okay
and with that we got a new measure new calculated field let's go and check the results so I'm just going to drag and
drop it on The View so what this function does is it's going to return the position number of the current value
so that means the first position in this view going to be the first row as we are moving from top to bottom so this going
to be the position number one position number two three four and so on until we get the last value as the last position
so now you might notice that we are calculating all the rows in the table so we are using the scope of the table we
can check that if you go over here to our measure and right click on it and we can see that the compute using is the
table down let's say that we would like to have an index for each group not for the whole table so let's go and switch
it to the pain down so now as you can see the calculation going to depend on the pain not the whole table so for the
first group we have the first row the bookcases then the second third fourth and so on then it Go and reset for the
second group so on the secret group going to be this row going to be the number one and the last position or the
index in this group going to be the supplies and not the last one the fonts so as you can see it always reset for
each group because we have specified the scope only for the pain and now if you go and switch it to the cell so let's go
and do that Computing using cell you can see that each cell going to be the first value so the position number for each
row going to be one so this is how it works with the scoping in Tableau all right so now let's go and switch it back
to a table so Computing using table down so as you can see it's very simple let's go and try another function in Tableau
we're going to use this time the first function so let's create a new calculated Fields we're going to call it
first and the function going to be as well really easy it's going to be first and that's it it's like the index you
don't have to specify anything inside the calculation so the calculation is valid let's go and hit okay and check
the result as well in the view so let's drag and drop it over here and now we can see that Tableau assigning the first
row with the value of zero and as we are moving down with the values as you can see the numbers are decreasing and those
numbers going to be how many steps do we have until we reach again the top to the zero so here for example we need three
steps until we reach the first row and as well here we have minus 11 until we reach the top value so here we have like
a distance between each row and the first row and in Tableau there is another function where it does exactly
the opposite it's going to be the last so let's go and try it so let's go and create a new calculated fields it's
going to be the last function not in this tutorial so it's going to be last and as well it doesn't need any Fields
inside it so that's all the calculation is valid let's go and hit okay and let's drag and drop it on The View over here
so now we can see that it has exactly the opposite effect of the first so table going to go and assign the last
value in our view with the zero and as you are moving to the top the value is going to increase and here again we have
the distance or how many steps do we have until we reach the last values okay guys we have one more function that is
very similar to the last first index where it going to like gives us the position number of the rows we have the
rank function so let's go and create a new calculated field we're going to call it
Rank and it start the keyword Rank and as you can see we have five different functions and how to rank the data we're
going to start with the easiest one the first one so let's select Rank and here we can specify two things for Tableau
the first one can be the expression or the aggregate functions in this view we have the sum of sales so let's go and
Define that sum of sales and the second information that tblo needs it as an optional it's going to be how to sort it
ascending or descending if you leave it empty table going to use it as a default the descending methods so let's stay
with the default that's all the calculation is valid let's go and hit okay and with that we got a new
calculated field let's drag and drop it to the view to check the results so now we can see that Tableau goes and ranks
all the subcategories based on the sales sum of sales so we can see over here that the phones has the highest sales
and we have it as a rank one and then the second highest sales we have it over here as a two for the chairs all right
guys so now if you look at those four functions and their results you can see that they are very similar to each other
right they going to define the position number of the rows using different methods so now you might ask what are
the use cases of those four functions well generally there are two use cases first we can use it as a filter in the
visualizations and second we can use it in another calcul so for the first use case for example
let's go and pick the rank and show it as a filters to the users they go and specify for example the top five
subcategories in the visual and you already know that there are different methods on how to show the top product
or the top subcategories in the visualizations and this is one methods in how to do that or we might be in
situation where we have a very big visualizations a lot of rows and I would like to show for the users only the
first five rows without any specifications or ranking or anything we can just Go and show the first five rows
so in order to do this we go to the first and show it as a filters let's go and reset the rank so we can go over
here and Define okay I would like to see the first five rows or the opposite we want to show the last five rows so we
can go to the last and show it as a filter let's go and reset the first so now we can go over here and say okay I
would like to see the last five rows inside my view so this is the first use case for these very simple table
calculations functions we can use them as a filter all right guys moving on to the second use case for these functions
I usually use them in another calculations to generate a reference line let's have a quick example let's go
and create a new worksheet we're going to take the order date to the columns and as well the sales to the rows and
this time we're going to have the months as well so let's change it from year to month and I would like to have it as a
bar diagram and as usual I want to show the labels and as well the colors from the measure so the test now is to show a
reference line based from the first value in the diagram so we have the first value of 21,000 so I would like it
to have it as a reference in order to compare the other moners with it so we can do that using the function first but
we have to add it in another calculations now in order to make it simpler to see how this works I'm just
going to go and duplicate this view in order to make it like a table so let's go to the show me over here and switch
it to a table and then I'm going to take the Mones to the row now we have a very nice table I would
like now to have the first value as a new calculated field okay and I would like as well to add to this view the
values from the first function so let's go and get the field that we already created and drop it on The View so as
you can see the first row in this table going to be the January 2018 so we have the value of zero and I would like to
show now the sales only for this row I'm not interested with the other rows only for the first row we have to show the
sales so in order to do that we have to go and create new calculated field so let's call it first sales and the logic
can be like this we're going to check if first function equal to zero so if we are at the first row as you can see we
have here the zero value what going to happen we want to show the sales so it's going to be then sum and we can to have
the filled sales otherwise we don't want to show the sales so that means we can go and end the if statements so with
that as you can see if the position number going to be zero like the first one then show the s otherwise don't show
anything so let's go and hit okay and with that as usual we got our new measure let's drag and drop it to the
view over here and as you can see tblo going to show the sales only if the first equals to zero and if not as you
can see we don't have anything so with that we got the first value in the sales and now we can go and use it as a
reference line in order to do that we're going to go back to our original sheets and let's go and add our new calculated
field to the details then let's go to the access to the sales right click on it and add reference line the value
going to be based on our new calculated field so let's go and switch it to the F of sales and we can go as well and
change the label from computations to custom and we can say okay this is the first so that sets let's go and hit okay
now as you can see we got our new reference line and the value of this reference line going to based always
from the first value so as you can see it's going to be 21,000 so we can go now and compare the other values to our
reference line and as well this can be very Dynamic so that means for example let's go and add a filter to our view so
let's go to the order date and show the filter so now what can happen if we deselect the 2018 the first value going
to be from January 2019 so here we're going to get the 47,000 as a reference line so with that we can understand the
power of table calculations they are based on the visualizations not based on the data source so anything you change
individual the table calculation going to react to it which makes it very Dynamic so this is another use case for
those four functions first last index Rank and so on for example you can go and say let's make the reference line
based from the last value in the table so you can go and switch it so that's it for those four
functions all right guys now we're going to talk about very important and very common table calculation in Tableau it
is the running total the running total going to go and sum all the values as they progress over the time for example
in this view we can track the performance of our business where we can go and compare the three different
categories of our products where we can see here the development or the progress of customers and as well the orders in
order to quickly understand whether our business is growing or declining so now if you compare in this view those three
categories you can see that the office supplies is growing very fast if you compare to the two others so as you can
see using the running total in our view help us to understand the progress the performance of our business so now let's
go and understand how this function Works in tableau okay guys so how the running total
calculation works it's going to go and add each value to the sum of all previous values let's have an example in
order to understand it we have over here the months and the sales as well and we want to build the running sum so we
start with the first value so we are currently at the first row and since we don't have any previous sum of values
it's going to be exactly the same value so the calculation going to be the current running total going to equal to
the sales value so that means in the output we're going to get exactly the same value 2,67 moving on to the next
month to the February so currently we are at this level at the sales 523 and the previous running total going to be
the old one from January so now in order to get the running total for February it's going to be simply adding those two
values so we are adding the sales Value Plus the previous total run and with that we will get
2590 so as you can see we are simply adding the current sales with the previous running value so let's move to
the next months we have a new current we have the 6,422 and we're going to add it again
here to the previous running total so we have again the same formula and with that we're going to get 9,13 so as you
can see we are just adding the current sales with the previous running total from the previous month so we can
proceed and progress our table until we reach the last one it's going to be exactly the same so we are currently at
December and this is our current value we're going to go and add it to the previous running total from the previous
month November until we going to get the last value and with that we have the final value for the total run as you can
see we build like a progress or development of the sales over the months so this is how the calculation of the
running total Works let's go back to Tableau in order to learn how to create it and build the visualization using the
running total Okay so let's start with the big data source and let's go to the products
here we're going to get our category to the rows and then we need the date so we're going to get the order dates from
the table orders and put it on the columns we need it as a continuous month so right click on it and then let's
switch it to this option over here now we need the measures because we are tracking the progress of customers we
want the count of customers so we're going to go to the customers over here and let's grab this measure customers
count and put it in the view and now we're going to go and change the visual from line to bar so we're going to go to
the marks over here and change it to bar so now we have here the total number of customers for each month we still don't
have the running total in order to do that it's very simple we're going to go and use the quick table calculations it
is the easiest one so right click on the customers over here and then let's add a quick table calculations and simply here
the running total let's go there so now we can see that tblo converted to a running totals for each category and we
can see immediately that the progress of customers in the office supplies is the P so as you can see it's very simple
what you are missing now is the count of orders the number of orders so let's go and get our second measure it's going to
be the orders count and let's grab it and put it near the customers over here but as you can see both of the measures
are very similar so we have to change indidual for the orders in order to understand the differences between the
two measures so how to do that if you go to the marks over here you can see we have three sections the first one is all
that means anything that I'm going to configure over here it's going to affect everything both of the measures but now
since we want to change the visual only for the orders we're going to switch the marks to the orders so let's click on
that in this tab now I'm configuring the running total of the orders so instead of bar I would like to have it as a line
and if we go to the colors over here we can add this doted line in order to see like the differences between the musles
and I can reduce as well the opacity in this line all right so now the next step we're going to go and change the colors
because both of them are blue so let's go to all and let's grab from the left side the measure name so let's go and
put it over here on the colors the next thing that we can do is to merge those two axes for each category into one so I
would like to have only one axis in order to do that let's go to the orders right click on it and here we have an
option called dual axess so what it's going to do it going to merge those two axess into one so let's go and click on
it so now as you can see we got only one AIS for each category we don't have any more of the split between two axes so
now we have it only in one view so now we can see that we got only one axis for each degree we don't have any more the
split between the two measures everything in one so now we can see that the axis are on the left and on the
right The Next Step what we usually do is but not always is to go and synchronize those axes so right to click
on it and we have here the option synchronize axes so with us both of the axes are at the same level we can go now
and hide the right one because it is useless to have the same information twice on the left and on the right so I
will go and hide the header from the right side and maybe we can go and get rid of those information that we have on
the axis so go and edit the axe and we can go and remove the title so that's it let's close I'm just minimizing the
information that we have inside one view so that's it as you can see now we can track the progress of the customers and
orders by the category using the function that is very commonly use the running
total all right everyone so now we're going to talk about the last table calculation function we have the
difference the difference is very simple it's going to find the difference between two data points and there are
many use cases for this function but the most famous one is to compare two things for example to compare period to period
a very common one is to compare the sales or profit month by month or year over year in order to uncover
seasonality or psychical patterns so now let's go and understand how this function
works all right so now in order to understand how the calculation Works we're going to have the following
examples where we have the sales over the months in the calculations let's say that we are currently at the month's May
so the current value going to be this value and for Tableau in order to create that difference it need always two data
points the first one always going to be the current value so in this example going to be the current sales of my and
the second data point here we have more freedom where we're going to select which value going to be compared to the
current value and in Tableau we have four different options the first one we can go and compare the current month
with the previous month so in this example we can compare the May with April so if you define it like this with
the previous Tableau going to go and simply find the differences between the current and the previous so Tableau
going to go and just subtract those two values this is the first option the second option that we have is to compare
the current value with the next month so in this example we're going to compare the month of May the current one with
the months of June so table going to go and simply find the differences between the current and the next months and it's
going to go and subtract the values and now moving on to the third option we can compare the current month with the first
month the first value that we have inside this table so that means in this example if we Define for Tableau the
first that means Tableau going to go and find the differences between the current sales it's going to be the sales of my
with the first so we have it as January and then go and subtract the values so now moving on to the last one I think
you already got it we're going to compare the current month the my with the last month the month of December so
table going to go and find the differences between the current value of my with the last value inside the
visualizations of December so it's going to go and subtract the two values so as you can see we have here four different
options in which value we are comparing with the current so either the previous value the next value the first value or
the last value so that means in Tableau we get like really great control which data points can be compared to each
others so now let's go back to Tableau in order to start practicing for this function all right everyone so now we're
going to go and create a view in order to compare the sales over the time over the years so we're going to go with the
big data source let's go to the orders and get the order date to the columns to have the years then we would like to
have the rows the months and the quarter so hold control and just duplicate it like twice the first one going to be the
quarter so let's change the format to quarter and the second one going to be for the month so we're going to replace
it as well to the month now I would like to make the TP a little bit bigger so I'm just going to stretch it from the
rows and as well from The Columns and now what is missing of course our measure let's go and get the sales and
put it in the view so now we have the sales aggregated by the months and spread it by the years so now we have to
create the differences between those years in order to do that we're going to go to our measure right click on it and
this time we're going to go use this option to have more control on the calculation so add table calculation
let's do that and now we have to configure a few stuff first we have to choose the calculation type it's going
to be the difference from so as a default this is correct and as well Computing use which scope which
direction we want so we want the direction from left to right we want to compare the years which is currently
correct we don't want to compare the mons together if you want to compare that we can switch it to table down so
with that we are now comparing the mons together but now we want to compare the years in order to do that let's select a
table across and then we have to spef if for Tableau relative to and here we have to Define one of the four options that
we learned before so we have the previous next first and last and now in this example we want to compare the
current year with the previous year so we going to stay with the previous so that means for example let's pick this
value over here it's going to be the differences between the sales of 2022 January and the year before with the
same month so it's going to be the difference between this year and the year of 2021 January and that's why for
the whole year of 2018 we don't don't have any values because in this view we don't have 2017 we don't have a previous
year it's going to be the first year that's why it's completely empty all right so with that we have created the
table calculations but as usual we're going to go and change the view that we are currently presenting for the users
so what I would do now I would reduce the number of years to only two years so let's go and apply a filter so show
filters and I would pick the last two years and now I would like to add to the view the total sales for each month so
in order to do that let's let's go and grab the sales and Dr it to the view so now on the left side we have the
differences in sales and then we have the aggregate of sales so now we can see very easily where those numbers come
from it is the differences between those two years all right so the next step let's go and replace those numbers with
visuals with bars so in order to do that we're going to take our measures and put it on the columns so this is the first
and the second and then let's change the visual instead of line to bar so let's go to the marks over here and say we
would like you have the bars all right so here as you can see all the measures having the same coloring so instead of
that I would like to change the coloring of the differences so let's go to the sum of sales over here as you can see we
have the icon of table calculations and then let's drag and drop the sum of sales the table calculations to the
color by holding control and let's change the colors of the first measure so let's switch the sum of sales the
aggregations and go to the colors and let's pick any color from here like for example the blue so that's it those
informations comes from the total sales from the aggregate calculations and this one comes from the table calculations
and it's very simple to create and with that we can go and compare the years for the sales and now if you would like to
analyze the differences between those two years you can see in January for example there is no big difference
between the year 2021 and 2022 there's like small growth but if you go for example to February you can see there
are big differences between the two years we have made a lot of sales in this months and another thing to notice
here is that in November we made less sales than the year before so as you can see we can very quickly
find the differences between those sales in 20122 and the sales of the year before so this is the part of the
difference function it's going to help us to compare two things like the years or maybe the categories month and so on
all right so that's all for the difference function in Tableau all right everyone so that's all we have covered
the four types of Tableau calculations and with that you have learned around 60 different functions in Tableau so that
you have enough Tools in order to create new fields in your data source and as well to manipulate your data and with
that we have completed the section tblo calculations and now in the next section things going to get really interesting
where we're going to go and build around 63 Tableau charts we're going to start with the basic charts like bar charts
and we're going to progress to more complex charts in Tableau now before we start learning how
to build charts in Tableau we have to understand some Basics like for example how to add multiple measures in one
single view I saw many new Tableau developers that they get confused on how to add a second measure to the
visualization because in Tableau we have different places and different methods on how to add multiple measures in one
single View and here in tblo we have three methods the first one is to use individual axes for each measure the
second method is to use one single shared axis using measure values and measure names and the third one is to
use dual axis in tableau so now we're going to go and learn those methods step by step and we're going to learn as well
the advantages and disadvantages of each methods so let's go all right guys now we're going to
start with the first methods we have the individual access for each measure so let's see how we can create it and how
it's going to look like let's go for example to our big data source let's pick the order date to the columns and
now in order to create individual axis for each measure we going to drag and drop the meur es in the rows or in the
columns so for example we're going to take the sales and put it in the rows and let's take as well the profits and
drag and Dr it to the rows as well and now we can see in our view that each measure has its own axis so that's why
we call it individual axis for each measure so we can see for the sales we have this axis that starts from 0 to 1
million and for the profit it starts from 0 to 100K and those two axes for those two measures are completely
separated from each others there is no overlapping or anything and now of course we have two measures we can go
and add a third fourth and so on so there is no limitations on how many measures we can add to our
visualizations so you can see now we have four measures and you can see each of those measures has different axis
with different range and now I would like to understand something very important in Tableau that once you are
adding multiple measures to the views you will get multiple pages on the marks the marks in Tableau is the place where
you're going to go and customize the visualization to customize the charts that we have over here in our view and
since we have multiple measures we will get multiple pages in the marks so let's check what do we have over here so we
have the first one is all then we have an individual Mark for each measure that we have inside our view so now let's
understand how this works let's start with the first one the all now in this page anything that you change in the
setup it going to be reflected for all measures for all charts for example instead of having the line I would like
to have the par but now if you I change it to Bar as you can see all the measures going to be changed to bar
charts or if you go over here for example to the colors and change it to Black you can see that all our measures
now are PL and so on if you go to the size reduce the size you can see the size of all our measures going to be
reduced so anything that I'm changing in the all it going to be reflected for all measures in the view but now since we
have individual access for each measures we can go and customize each of those charts individually so for example let's
say that I would like to change only the sales I can go to the marks of sales over here so let's switch to the page of
sum of sales and then instead of having bar I would like to have it as a line so now we can see we have changed the chart
type only for the sales everything else can stay as a bar chart and the same thing for the profit you can go over
here to the profits and say okay instead of black I would like to have it for example as blue so as you can see this
customization is going to be done only for this measure only for the profits and then the same thing for the other
measures if you say okay for the quantity I would like to change change the chart type instead of power let's go
for something like area so let's switch to the quantity and then let's go to the area over here so with that we have
changed only the chart type for the quantity so you can see those marks are really helpful in order to customize our
charts and you can go and do that individually for each measure or you can go to all measures over here and then do
the changes for all measures together so that's all for the marks they are really important in order to customize the
charts inside of our visualizations one more thing that's it's important to understand the dots we have here four
tabs inside the marks because we have four measures well because we have continuous measures so for example for
the years we don't have any tab in order to customize the years because it is discrete for example let's go and switch
the sum of sales from continuous measures to discret so right click on it and go to discret so with that you can
see that the sum of sales did disappear from The Mark so that means we cannot customize it anymore because it is
discrete so let's go and change it again back to continuous and with that we're going to get it again in the marks so
you can customize only continuous Fields all right guys so now as you can see for this methods we can go and customize our
charts individually and as we want and another advantage of that we can go and add as many measures as we want inside
our visualizations but the disadvantage here is that we have separated access which is in some situations it's really
hard to compare the measures togethers if they are like splitted like this that's why we have in tableau different
methods in order to combine and to merge the axes and the charts together so that's all for the first methods where
we're going to have individual axis for each measure all right guys moving on to
another methods in order to combine multiple measures in one View and that is by sharing the same axis we can do
that using the measure names and measure values if you check the data bin in each data source in Tableau you will find
always two fields we will have always measure names and measure values those two Fields the measure names and values
they are automatically generated from Tableau they don't come from the original source of your data so what are
those fields the measure names is a discrete Dimension that contains the names of all measures that you have
inside your data source and in the other hand we have the measure values it is continuous measure that contains the
values of all measures that you have inside your data source and in Tableau there are two ways in order to use the
meure names and values the first one is by simply just drag and drop from the data pay to the view so let's take for
example the measure names to the rows and as you can see currently no measure values are selected because we don't
have anything in the view so now what we're going to do we're going to go to the measure values and let's drag and
drop it to the text over here and now you can see in the view all our measures that we have inside our data source so
the count of customers count of orders discounts profit sales and so on so those are all available measures that
Tableau can find inside your data source so here again the measure name going to be the name of the measure so the count
of customers count of orders those informations comes from the measure names and the values of those measures
going to come from the measure values so as you can see it's very simple the names of the measures the count of
customers discount and profit those names comes from the measure names and the values that we have inside this view
comes from the measure values so here you can control stuff for example you can go and remove any measure that you
don't want to see inside our view so for example let's go and remove the sum of unit price so just drag and drop it
somewhere outside and as you can see table created immediately a filter so if you go over here on the filters and edit
it you will see a list of all measures that we have inside our data source and as well if you want to remove some
measures you can go and deactivate or deselect the measures that you don't want to see inside our view let's go and
hit okay and with that we have reduced the number of measures inside the vi24 and one more thing that we can do over
here that we can go and change the sort of the measure inside our view so for example let's take the count of
customers from the top and put it in the bottom as you can see we just Chang the order of the measures inside the view
all right so this is one way in order to use the measure names and measure values inside the visualizations by just drag
and drop them inside the view but there is like another quick way in order to use those informations let me show you
what I mean I'm just going to go and remove everything from our view and then starts from a scratch let's take the
order date to the columns and let's take for example the sales to the rows so so so far we have only one measure in our
view everything as normal but now let's say that I would like to add another measure to the view before we learn that
we take the profit and put it near the sales but with that we have learned that table going to go and create two
individual aess we don't want that so let me just remove it I would like to have one axis for both of the measures
so in order to do that we can use the measure values and names and in order to quickly generate that let's take the
profits and now very slowly let's just drag it to the AIS of the sales and as you can see now Tableau going to show us
two green vertical lines so with that we are telling Tableau that I would like to share the same axis for two different
measures so let's just drop it on the axis and here tblo going to go and convert everything so we don't have
anymore here the sum of sales we have now the measure values and in the filters we have the measure names inside
it we will get only two measures and the sales so as you can see T can prepare everything for us and this is a quick
way in order to use multiple measures using the measure values and measure names and we can see as well here in the
measure values that we have only those two measures so now let's check the visual as you can see we have only one
axis for two measures so the green one going to be the sales and the gray one going to be the profits so that means
those two measures are sharing the same axis and of course we can go and add more measures to our view not only two
we can take for example the discounts we can go and drop it inside the measure values to the last one for example and
with that we got three lines three measures are sharing the same AIS so it's really nice and compact way in
order to compare multiple measures using the same axes but of course here you have to pay attention to the scale of
the aess for example the scale of the sales as you can see the green one is really huge from 0 to 1 million now if
you check the discount as you can see everything like almost zero because the scale compared to the sales is very
small that's why for this methods it makes sense to use multiple measures in the same access if they have a similar
scale of data but if there's like big difference in the scales the visual will not make sense in order to compare two
measures so in this example it doesn't really make sense to use the discount inside these visualizations because we
cannot really compare it it has really small scale one more disadvantage of this method is that if you check the
marks over here you can see that we have only one tab for everything we don't have individual marks for each measure
and that means we cannot go and customize each measure as we want like we saw before in the method one where we
want to use in one case for example the line diagram and another measure we can use the bar diagram and so on so we
cannot go and customize individually each measure but instead all those measures are sharing the same setup for
the visualizations so that means let's go for example and go and change the sides if we do that it's going to affect
all measures inside the view and I cannot change it individually so everything that you are making here or
changing in the visual is going to affect all the measures for example let's go and change it to bar diagram
and so on the only thing that you can go and customize is the colors so if you go to the colors over here and edit colors
you can assign for each measure a different value but that's all so we cannot go and customize the charts as we
want so if you use measure values and measure names pay attention you can don't have the freedom of changing the
visuals of your charts but it's still very useful in many cases where you want to have multiple measures sharing the
same single AES all right so with that I hope it's more clear now why do we have in Tableau measure values and measure
names all right everyone so now moving on to the last CL methods in order to combine multiple measures in one view we
can use the Dual axis dual axis are really great way and very useful in many scenarios where you can go and compare
two measures together so let's see how this works in Tableau and there are two ways on how to create toal access in
Tableau the first one I'm going to show you now is that let's take for example the order date to the columns and then
let's take the sales informations to the rows and now I would like to get another measure inside our view so let's take
the profit and just put it in the rows side by side near the sales so here we are back to the method one where we have
two measures separated with two individual access so now as you can see those two measures are separated from
each others I would like to bring those two visuals on top of each others so how to do it let's go back to our measures
so as you can see we have two measures the sales and the profits we're going to go to the profit to the one on the right
side right to click on it and here we have the option of dual access so let's go and click on dots so now as you can
see those two charts now are on top of each others using dual axis the axis for the sales and the axis of the profits
side by side and we can see as well the shape of those measures that change so now instead of having two green pills we
have now one green pill from two measures the sales and the profits and now if you check the scales of those
dual axes you can see that the sales as usual from 0 to 1 million and the profits from 0 to 100K so now here you
have two options either you can leave it as it is with two different scales or you can go and make them similar to each
others and this is what we do in most situations we go and synchronize those two axis so in order to do that let's go
to the profet over here on this axis right click on it and here we have the option of synchronize axis so let's go
and select that as you can see now the profit scale has exactly the same scale as the sales it starts from 0 to 1
million and the marked or the visual did adjust as well to the new scale so as you can see now we have it on the btom
before we had it near the sales and now you might ask you know what why do you use dual aess I can just go and use the
measure values like the method two and I can add as many measures as I want to the view so why do we have dual access
well there is two reasons for that first here you have the option to decide whether you want to synchronize the Axis
or not so if you go to the method one with the measure values you can see that everything is synchronized and you have
only one axis and we cannot change that but if we go back to the Dual axis we have always the option to synchronize
the Axis or not so this is one benefit the major benefit of dual axis is that I can go now and customize each measure as
I want so if you check the marks we have here again a tab for each measure so again the all going to customize both of
the measures but if you go to the sum of sales we can go and decide the visual setup of this measure so for example I
can go over here and change the size or I can go to the sum of profits and say instead of the line diagram I would like
to get a bar diagram so here is exactly the advantage of the Dual AIS where we can go and customize the chart or the
measures individually but still using the same axis and you don't have this option if you are using the measure
values because you have to make a decision or a setup for all measures but the disadvantage here is that it is dual
AIS so only two measures but it's still great way in order to compare two measures in Tableau I would like to show
you now the second method on how to create quickly dual access in Tableau so let's go and remove those stuff and then
let's take again the Sals and now for the second measure instead of dragging and dropping it here near the Sals and
then switch it to dual what we're going to do we're going to go to the visual over here and if you move it to the
right side you can see that we have one vertical line and here be careful if you move it to the axis you have two
vertical lines where you're going to have the measure values and measure names we don't want that we want the
Dual axis so just move it to the right side the opposite side of the axis and you can see we have one vertical green
line if you drop it Tableau going to go and create immediately dual access between those two measures so this is
how you can create dual access in Tableau quickly and one last point about the Dual access is to understand the
order of the measures has an effect on the visual so let me show you what I mean I'm going to go now to the profit
and change it from bar diagram to line diagram and as you can see the red line from the profit is like in front of the
sales so that means the major sales is in the back and the profit is in the front if you want to switch that
inividual what you're going to do you just going to switch the order of the Dual axis so if we take the sales from
left and just put it on the right and as you can see now the bar diagram in the front and the line diagram in the
background which in this situation it's not really cool to have the line behind the bars so now let's go and switch it
again so the profit on the right side so what that we're going to get it in the front and the sales in the back all
right so that's all for the Dual access and now of course in Tau you can go and mix all those methods together in single
view so here we have a dual access in this example I can go now and add the measure values instead of the profit so
instead of having the profits we can have the measure values the method two so in order to do that let's take for
example the quantity and let's drag and drop it on the axis of the profit so let's drop it over here and as you can
see table immediately switch the sum of profit to measure values but still on the left side we have sales so now we
are doing a dual access between the sales and a bunch of measures so now we can go and add more measures to the
measure values so let's take the unit price and add it over here we can add the discount but now let's just change
the colors in order to make it more clear so now I am at the tab of the measure values click on the colors edit
colors and now the quantity I'm going to give it green your unit price let's give it gray discount this color and that's
all so with that as you can see we have different lines but all of them are lines we cannot change that because it
is a measure value so all of them are sharing the same setup and on the background we have the sum of sales from
the Dual AIS so that means you can go and combine those stuff and of course we can go and add the method one so let's
take the count of the orders and just drag and drop it to the rows over here so with that you can see that Tableau
did go and create an individual access for the count of orders so that means if you look now to our measures in this
view the first one the sum of sales we are using the Dual axis this bar diagram the blue one and then on the right side
of the Dual axis we have Punch or bundle of measures so here we have the sum of profit quantity unit price and discount
so we have a group of measures as a part of the Dual axis using the measure values count of order it is completely
separated and not sharing the axis with the others so we have it as an individual axis using the method one all
right so as you can see you can mix the stuff and this is exactly the power of Tableau where we have high customization
ations on how to visual our data all right everyone so now let's have a quick summarize in order to
combine multiple measures in single View and single visualizations in Tableau we have three methods the first one is to
use individual axis that means we going to have for each measure a different separated independent axis and the main
advantage of this method is that we can go for each measure and decide about the visuals which visual type we can to use
the colors the Ing and so on so the customizing of the measures going to be independently and the second benefit is
that we can go and add as many measures as we want inside one view but the weak point in this method is that it's really
hard to compare those measures together that's why we have the second method where we can go and compare all those
measures together using one shared or single axis and we can create such a visualizations using the measure names
and the measure values so we have only one axis and we can have multiple measures sharing the same access well
the main benefit over is that we can add as many measures as we want and as well we can compare those measures better
than the method one since they share the same access but the disadvantage in this method is that we cannot go and
customize each of those measures independently so this means all those measures going to share the same
configurations of the visualization so we cannot use here a line then a part then change something else we have
always to use the same visualizations for all measures and then that's why we have the third method in Tableau to use
the Dual axis so the main benefit of the Dual axis do we can compare two measures closely to each others we can define
whether we're going to synchronize the Axis or not and here the advantage compared to the previous one the single
axis do we can customize the visuals for each measures independently so here we have a line diagram together with a bar
diagram only this advantage of this method ad do we can compare only two measures all right guys so that was the
different method on how to add multiple measures in one single View and when to use them next we're going to start
building basic charts and first we're going to have the par charts now we have a marathon where
we're going to go and build 60 different charts in Tableau so we will start with very basic charts and we're going to end
up making very complex charts and we will have different charts like bar charts line charts area maps circles and
everything but here I have to warn you if you just sit down and watch the video it will not help you so here my
recommendation is that you pause the video you make the same charts and then you continue so you don't jump to the
next chart without practicing with me so let's stop talking and wasting time let's go and start building charts in
Tableau all right so now we're going to start with the easy stuff where we're going to build a bar chart in rows so
let's start with the big data source and let's take the subcategory to the row and then we need a measure let's take
the sales and put put it in the columns and now with that we got the sales by category and now in order to make it
bigger I'm just going to go over here instead of Standards let's take the entire View and now as you can see we
have bars in the rows TBL can use bar chart as a default but in case you have something else you can go to the marks
over here instead of automatic you can move it to a bar so let's go and click on that nothing going to change because
currently is a bar charts and we usually use the bar charts and rows in order to make ranking so in order to do that
let's go to the sales and sort our data so with that we got a very nice ranking in our charts one more thing that I
usually add is the coloring so I take the measure the sum of sales hold control and put it on the colors all
right so that's all for the bar charts and rows okay the next one we have the bar
charts in columns it's very easy and very similar to the rows I just duplicated the worksheets so now here
instead of having the dimension on the rows we have to move it to the columns so we have to switch between the measure
and the dimension in order to do that it's very simple let's go to the quick menu over here and just switch it so
with that we got the parts now on the columns so as you can see it's very simple we usually use this as well for
ranking and of course now the question is when to use columns and when to use rows if you have a Dimensions with low
cardinality like here we have the subcategory you can go and use the columns but if your dimension has a high
cality a lot of values you can go and use the RADS in order to have like a long list and you can scroll down it's
always better to scroll down than to scroll to the right sides so if you have a lot of values inside your dimension go
with the bar rows but if you have low number of values inside your dimension go with the column
bars all right moving on to another bar charts we have the side by side bars in the previous bar charts we have used
only one dimension this time we're going to go and use two Dimensions so let's go and build it first I would like to get
the dimension country to the columns and then let's go and get our measure the Sals to the rows so with that we got the
normal bar charts but now if you go and add another dimension to the columns you will get side by side bar charts and the
second dimension going to be the years of order dates so drag and drop the order dates to the columns so as you can
see tblo did convert it to line chart we don't want that we want bar charts that's why we go to the marks over here
and instead of automatic we're going to switch it to bars and again here I would like to make it entire view now we have
a lot of data inside the view so we have five years of data I would like to have only two values so I would like to
compare the last two years so let's drag the years to the filters and then here I'm going to filter using the years so
select the years next and let's have only the last two years click okay and the last thing that I would like to add
is the coloring since we have two years I would like to have for each year a color so let's take the year hold
control and put it on the colors and that's it we have now really nice separations between the values so now as
you can see we got side by sidebars and it's really useful in order to compare multiple values in each category so with
that we can really easily compare the last two years in each country and here in this type of charts try to not have a
lot of data then it's going to be really hard to compare data so as you can see we just have a filter on the data in
order to compare only the last two years so that's it for the side by side charts all right moving on to the next
one we have the bar chart of our time it's very famous one you're going to find it almost in each dashboard so
let's see how we're going to build it we're going to go to the order dates let's put it on the columns and as usual
we're going to have the years let's go and get our measure the sales and put it in the rows and here as a default table
going to show it as a line so let's go and switch it to the bars since we are working on the bar charts so with that
we got very nicely the sales over the years but we usually add more details because those data are very aggregated
so let's go and add another date dimension in order to do that let's just drill down the years so click on this
plus sign and with that we got the second dimension the quarter and here we can see more details about how the sales
are changing over the time so the main use case of this part chart is to show how the data are changing over time to
show Trends so if you have such a requirement go with the part chart over our time
okay moving on to the next one we have the Stacked par charts the requirement for this one is going to be similar to
the side by side we're going to use two different dimensions so now let's go and build it I would like to see the total
sales of each month for this year so in order to do that let's take the order dat to the columns and let's take the
sales to the rows and now I'm going to go and switch the years to months so right click on it and let's select these
formats the month so that we got those parts s that represent the total sales for each month in this year but now I
would like to add more information to this view in order to compare as well the categories so now let's go and get
the categories but here is always a question where we're going to place it if you put it in the columns what you
going to get you will get side by side bars we don't want that we want to get stack charts in order to do that let's
take the category and put it just on the colors so let's go and do that and with that we got this information this
dimension as a color inside each bar and with that we're going to have the Stacked bar charts so now as you can see
the main purpose of the Stacked bar chart is first to have the total of sales over the time so we can compare
the months and how the sales are developing over the time then the second task which is not the main task is to go
and compare the categories to see how the categories are contributing in the total sales of each month so that's all
for the Stacked bar chart all right now we have a very similar chart to the previous one we have the
full stacked par chart or sometime we call it 100% stacked par chart so now I just duplicated the previous one and as
you can see in the normal stacked bar charts each bar starts and ends differently from month to month total
sales is not really important in these charts what is important is now to compare the subcategories over the time
and a very nice way in order to do that is to have full stacked part that means each part in our visualizations can has
exactly the same length and it starts from 0% to 100% so in order to do that let's go to the sum of sales right click
on it and then let's go to the quick table calculations and have the percent of total so with that we got the percent
of total instead of the total sales as a value but we still not there because those parts are not having the same
length in order to do that let's go back to the of sales right click on it and let's go to edit table calculations so
let's go inside and now what we're going to do over here instead of having table across we're going to have specific
Dimension so let's go and switch on that and we're going to select only the category since we are focusing only in
the category so let's remove month of the order dates and now as you can see we get immediately a full Stacks so
let's go and close this so now as you can see all those parts has exactly the same length and they all start with the
zero per and end up with the 100% And we call this type of chart as part to whole that means I would like to see and
understand how each category are relate to the wh sales of each month so now let's quickly summarize when to use
which chart if you want to focus on comparing the categories over the times then go with the full 100% stacked bar
charts but if it's more important to show the total sales of each month then compare the categories then go with the
nor noral stacked bar charts all right moving on to the last type of bars we have the small multiple
bar charts many bar charts inside our visualizations and we can do that by adding more than two Dimensions so let's
start with the First Dimension we're going to go to the countries from the data pane let's put it in the columns
and with that we got the values of the countries as columns I would like now to add rows from the category so let's get
the second Dimension the categories to the rows and now I would like to fill those informations in order to see some
data so let's go and get our measures the sales drag and drop it to the rows over here so now as you can see our bars
are not really small so still we have big bars inside our view and always we can go and check how many marks or how
many bars do we have inside our view by checking this information over here we can see that we have 12 marks so now
let's go and get our third dimension it's going to be the order dates so let's get the order dates date to the
columns and now we went from 12 to 60 marks or 16 data points now Tableau switch it to lines I would like to bring
it back to bars so let's go to the marks switch it to bars but still our bars are not really mini or small so in order to
go more in details inside our view instead of using the years we're going to go with the month so let's go and
change the formats right click on it and let's choose this format The Continuous one the month so now if you check again
we went from 60 to 700 seven marks many bars inside our view I would like to add as well some colorings to it let's go
and get the country to the colors so that's it with that we got small multiple bar charts as you can see as
you are adding more Dimensions to the view you are splitting the measure to more and more
details okay next we have the bar inar chart previously we have compared two Dimensions inside our view but now how
about to compare two measures in our views using bars so let's see how we can do that as usual we're going to take our
subcategory to the rows and then let's take the first measure is going to be the sales to the columns so now with
that we got our standard bar charts let's go and sort it by the sales now we need our second measure so let's go and
take the quantity and put it as well in the columns so now with that we got individual axis for each measures and we
can go and compare the data but it's way more better if you have two measur and you want to compare them is to use the
Dual axis as we learned before in the previous tutorial so let's go and use the Dual axis we're going to go to the
quantity right click on it and let's go to the Dual axis now here tblo did decide to go with other visualizations
since we have automatic instead of that I would like to switch it back to bars and as you know in the Dual axis we will
get different tabs inside our marks so now since both of them going to be bars we're going to go to all and then select
instead of automatic we're going to have have the bars but now as you can see we are not there yet it's like the Stacked
part but actually it's not stacked so in order to change that what we're going to do we're going to go for each individual
measure and change the setup but first I would like to change the coloring I don't like those current informations so
let's go to the quantity make it orange the S is going to be blue let's it okay so now what we're going to do in order
to have bar in bar we're going to go and change the size of the quantity so let's go to quantity over here go to the size
and just make make it little bit smaller so now we can see in the background the big blue bar and in the front we have
this small orange bar so with that we got something like bar in bar chart which is really great in order to
compare two measures using dual axis so here for example if you check the category art you can see the the
quantity is really huge but we are generating very few sales compared for example to the coverers we have less
quantity that is ordered but we have huge sales so it's really nice way in order to compare
measures all right the next one is going to be fun one where we're going to create bar code charts we usually use it
in order to show more details inside each bar so let's see how we can do that as usual we're going to get the same
informations subcategories to the rows and sales to the columns I think you already got it let's go and sort it and
now what I would like to bring is a dimension with high cardinality like the product name so let's go and bring it
for example to the road over here as you can see Tableau is warning us and telling us there is a lot of members
inside the product name and now if you go and say Okay add all members what going to happen the view going to be
broken and it's not really informative but instead of that we can take the product name and put it on the details
so let's go and do that and now with that we have built something like barcode where we have the product
informations inside each bars which is sometimes useful to show all those details in one view so that's how you
build barcode charts all right so now we're going to start talking about the line charts in
Tableau they are very Basics and very standards in order to show the change of our time so now let's go and build very
simple line chart in Tableau since we are saying change over time that means we need the dates let's go and get the
order dates to the columns and in the rows we need our measure sum of sales so now as a default as usual tblo going to
show the years but instead of that in order to make it more interesting we're going to go and switch it to months so
let's go and change the format to month continuous so click on that and now with that we got our line charts and if for
some reason at your end you are not getting line charts in order to switch it to line charts we go to the marks and
then instead of automatic let's go and choose the line so once you do that you will get exactly like by me a line chart
so this is the most basic line chart in Tableau that shows the ch of our time okay so next I would like to show
you the different visuals that we can add to our line so for that let's get more measures to our view So currently
we have the sum of sales let's get everything like the discount the profits and we have already the sales let's take
the unit price and as well the orders so now as you know since we have five measures in our view we get as well five
tabs in the marks in order to indiv ually set up the visual so for the sum of sales we're going to leave it as it
is as a standard line charts but for the next one what I'm going to do we're going to change the path or the visual
of the line so if you go over here on the path and click on it we will get different types of lines so the first
one going to be the standard one the linear but the second one going to be a step so let's go and select dots so now
if you check the discount over here we don't have a linear charts like the sales we have now like Steps like it's
jump up and then we have steps down all right so let's move next to the profit over here so let's switch the tab to the
profit so now we're going to go again to the path and here we have two sections the line type and the line pattern so in
the line pattern we have the solid line or we can make a dashed line so let's go and select the dash line and as you can
see now in the visuals we have very nicely a dash line in Tableau so this is one more way in order to present the
lines in Tableau let's move to the next one to the next measure we have have the unit price let's switch there and now
what we can do over here for each data point that we have in the charts we can make a marker or like small circle so in
order to add the markers what we're going to do we're going to go to the colors over here and then here we have
the effects so the first one is automatic the second one to have marks and the last one to have no marks so
let's go and switch everything to Marks and now with that you can see the line chart in the Enterprise has like small
circles small data points so this is one more visual effect on the lines in Tableau let's move to the last one the
count of the orders so let's switch there now what we can do we can change the size of the lines depends on the
values so in order to do that let's take the count of orders so with control drag and drop it and put it on the sze so now
if you take the last line we're going to see really nice effect if the values are small we will have a thin line but if
the values are high we will get like a heavy line which is really looks nice all right guys so as you can see Tableau
is very rich in the visualizations and with few clicks we can change the visual representations of the
lines all right now we're going to build the multiple line chart in Tableau I'm always duplicating the sheets in order
not to build everything from scratch each time so now previously in the standard line we can see the changes
over time but sometimes we want to add more informations we want to compare the values of one Dimensions inside this
View and we can do that by having having multiple lines so let's say that I would like to compare the values inside the
category so let's go to the categories in our products and now let's put it on the colors so drag and drop it to the
colors and as you can see by doing that tblo going to go and plot three lines for each value inside this Dimension so
with that we got multiple lines inside one View and now we can see that it's not really informative because we have a
lot of lines and a lot of zigzags in order to reduce that we're going to switch the format to Let's say for
example a quarter so now it's a little bit more clean in order to see how the data are changing over time and you can
compare the values of one Dimensions so the number of lines really depend on the values inside this Dimension one more
thing about how to create those three lines you don't have to have it always on the colors if you move the category
from the colors and put it on details you're going to get the same effects where Tableau going to go and create
multiple lines for each value but this time without colors so this is another method on how to create different lines
in in Tableau but I think it makes more sense to have it on the colors to have subed color for each line so this is how
you can create multiple lines in Tableau using Dimension all right the next one we're
going to have dual line charts this time we're going to go and compare two different measures in one view so we're
going to create for each measure one line so now I'm going to stick with the same view where we have the sum of sales
and the quarter for the order dates so now we'd like to compare in this view two measures the sum of sales and the
profit so let's take the profit and put it side by side by the sales and with that we got two different lines for each
measures but I would like to have it on top of each others so in order to do that we're going to go and use the Dual
axis so let's go to the profet right click on it and here we have the option of dual access so with that as you can
see it's very simple we got dual line charts and here you can add more stuff for example you can go and synchronize
those two aess by going to the Bret right click on it and here you can go and synchr ize it or of course we can go
and set up each line differently so let's go to the profit over here go to the path and let's make it a dash line
so as we learned previously using the Dual axis we got the freedom of changing the visual of each measures individually
and this is really great way in order to compare two measures okay moving on to the next one
we have the cumulative line charts So currently in the standard line charts we are using the month and the sum of sales
and we can see the total sales for each month but sometimes we would like to understand how the thing are developing
or growing with the time so now if we want to see the growth of our time we have to use a cumulative line chart in
order to do that we're going to go to the sum of sales and instead of having some of sales as aggregate functions
we're going to go and create quick table calculations to have the running total so let's go and switch that and as you
can see we're going to get very nicely cumulative line charts where you going to see how the thing are growing over
the time but of course to make things more interesting we're going to add more informations to our view so let's go and
get the category and generate different lines so we're going to drop it on the colors and now we can see how the
different categories are growing over the time and what we can add as well to the cumulative line is the ending point
of each line so in order to do that we going to go to the marks to the labels so click on the labels show Mark labels
but now as you can see we have for each month one label we don't want that we want only the ending of each line so in
order to do that we're going to switch it from all to line end so now if you check our lines you can see at the start
and at the end we have these informations but the starting point is not really interesting so we can go and
disable it so label start of line let's go and disable it and with that we're going to have the total sales of each
category at the end of the line so with this we can go and analyze the growth over time for each category
okay so now we're going to go and create small multiple line charts as we done for the bar charts we're going to do it
now for the lines so now what we're going to do we're going to bring like at least three dimensions to the view in
order to break down the sales to smaller lines so let's go and do that we're going to get as usual the order date to
our view let's get the sum of sales to the rows and then we're going to get another dimension the category to the
rows as well so as you can see now as we are adding more Dimensions we are splitting the lines let's go and get the
countries and put it as well to the columns so now that we got more charts but T going to show it as bars since we
have it as automatic so let's go and switch it to lines and now we have it as a discret line instead of that let's get
a continuous line in order to do that let's go to that dates and switch it to something like the month as continuous
so let's change the format and with that as you can see we get very interesting multiple line charts and I would like to
add the colors as well so let's go and get the country for example and add it to the colors and now just to enhance
the visual let's go and remove the grid so right click over here and then let's go to formats then we're going to go
over here to the lines and then we have the row tab so let's go to the grid lines and move to none so with that we
have removed those grid lines which is really annoying to have a lot of them and then the last thing that we can do
is that we can have the total sales of the last point in order to do that let's get the sum of sales hold control and
put it to the labels and then we're going to go to the labels over here and let's select min max we're going to have
it by the order date so let's switch from automatic to month and let's have only the maximum value so let's remove
the minimum value so with that we got for each chart like the total sales for the last month so with that we have
created very nice small multiple line charts in tableau all right moving on to the next
one we have the highlighted line charts in Tableau this is especially important if you have multiple lines in one single
View and there are different methods on how to do it I'm going to show a quick one and a professional one so let's
start with the quick one let's have multiple lines in our charts I'm going to take this time the country and put it
on the colors so with that we got a one line for each value inside the country Dimension and now I would like to give
the ability for the users to highlight one of those values in order to do that it's very simple go to the country over
here right click on it and let's go to the highlighter so here we have the option of show highlighter click on that
so with that if you check the right side we're going to get small box in order to highlight the values inside the
countries so the users can go over here and select one of those values for example Germany and as you can see TBL
can go and highlight the line of Germany and it going to plure all other lines so this is really nice way in order to go
and highlight different values in Tableau in order to focus on one value so this is really great way in order to
go and highlight one line especially if you have a lot of multiple lines so that was it this is how you can create
quickly a highlighted line chart in Tableau all right so now we're going to talk about the second methods on how to
create highlighted line charts but this time more professionally so now I just duplicated the old line charts where we
have the quarter some of sales and the countries on the colors but this time we're going to get rid of this
highlighter so I'm just going to go and remove it so now we have to give the users a list of all countries in order
to select and this selected country going to be highlighted in the view so in order to do that we're going to go
and create a parameter so let's go to the datab ban right click over here then create a parameter so here we're going
to give it the name select country since the country values are string the data type going to be as well a string and
now next we're going to go and create a list of all countries that we have inside the dimensions so here we have
four values we have France be careful that you have exact case so the first character is cap IED and the rest is
small so we have Germany Italy and the last one is USA so that's it for our parameter let's
go and hit okay so with that we got our new parameter on the left side right click on it and show parameter in order
to see it here on the right side now the users can go over here and select one of those countries but as you can see
nothing is changing in the view because we haven't connected yet to our view now in order to connect it to our view we
have to go and create a new calculated field so let's go to the data pin again create calculated Fields let's call it
highlighted country and here we're going to have a very simple condition where we're going to say country equal our
parameter so our going to be select country so here what we are seeing that if the selected country from the
parameters equals to the value of the country then we're going to have true otherwise it's going to be false so for
example now we currently we have the value France selected in the parameter that means the country FR going to be
true and all other countries going to be false let's go and hit okay so now we're going to go and work highlighting the
selected country in order to do that let's start with the coloring So currently we have the coloring on the
country I'm going to go and move it to the details so that means now the countries are just creating the lines
and not responsible for The Coloring of the lines now in order to bring the coloring we're going to get our new
calculated build the highlighted country and let's put it on the colors so now you can see that we have only two colors
because we have false and true so if it's true it's going to be orange if it's false it's going to be blue but I
would like to change those colorings to do the Highlight effect so let's go to the colors edit colors false going to be
gray and the true going to be let's say for example the blue let's hit okay so now we get like a highlight effect all
other lines are gray and only the one that we selected going to be blue but now let's go and test our parameter so
we have here France selected currently let's select Germany and as you can see and as you can see now that selected
line going to be Germany let's take Italy and USA so now as you can see our parameter Now is working so now here we
have a little bit issue where the highlighted line is behind the gray lines so in order to switch that I would
like to have the highlighted in the front and the gray in the back we're just going to go to the legend over here
if you don't have it you can go to the analyzes and then here we have the option of the Legends and make sure to
select the colors So currently it's selected by me so what we're going to do we just going to switch those two values
so let's take the true and put it on top so with this we have sorted those two values and as you can see in the chart
the blue color in the front and the gray color in the back and now the next step in order to create this highlight effect
in Tableau with do we're going to change the size in order to do that we're going to use our new calculated field so the
highlighted line drag and drw it on the sides by holding control and now with that we got different sides for the
highlighted line compared to the others but here we have the opposite effect but we don't want that we want the rest
going to be thin and the Highlight going to be heavy so in order to do that let's go to the legend over here just double
click over here and now as you can see the true is thin the false is heavy in order to switch it we're going to go to
reversed let's click on that and hit okay so with that you can see the highlighted line is way heavier than the
rest you can change the size if you don't like it like this so we can reduce little bit the size and it's going to be
now more nice all right so that's all on how to create highlighted line in Tableau more professionally than the
previous one where you have more control on the sizing and the coloring the users can go over here and start changing the
value and with that we are highlighting one line compared to the others so that's
it all right next we have a fun one where we're going to build a pump chart using lines in order to do ranking
between different values so now for example I would like to rank the countries over our time in order to do
that we're going to have the same view where we have the quarter and the sales and we have a line so now the first
thing is that we're going to go and grab the country and put it on the colors in order to create those different lines
and now since the analyzes is about your ranking not the total sales in order to build that we're going to go to the sum
of sales over here and we're going to go and create a quick table calculations here we have the rank function so let's
go and select that so now we have ranking that the on the whole table or on the whole view I don't want that I
would like to rank between only four values so in order to do that let's go to the sum of sales over here right
click on it and let's edit the table calculations so let's go inside and now instead of having table across I going
to go and specify Dimension so now we would like to have a ranking only using the country so we're going to have only
four values I'm I'm just going to go as well and deselect the order dates so let's go and close this so now we have
some kind of effect of the pump chart but we are not there yet as you can see the ranks like start from the bottom to
top I would like to reverse it in order to do that right to click on the axis edit the axe and then let's reverse so
that's all let's close this as you can see now we have the top rank at the top and then the bottom we have the lowest
rank so now in order to have this pump effect we have to have like circles inside of our visual we can do that very
easily if you go to the so now in order to have the pum effects we have to have lines we have it already but as we have
to have circles on the data points there is one easy way in order to do that let's go to the colors and change the
markers to circles so now as you can see we got our small circles on each data point and we get the pump effects but
now sometimes we go more advanced in these charts where we can make our own customizations for those circles where
we want to make those circles those data points little bit more Biggers and inside it the rank so now in order to do
that let's first hide those small circles we don't want that so let's go to the colors and just have a line
without markers now in order to have circles we have to have the same measure again in our view so let's take the sum
of Sals hold control and put it on the right side so with that we got two charts for each measure let's go to the
second one to the sum of sails over here and instead of having lines let's move it to circles so switch the marks here
to a circle so as you can see now we got very nicely those circles and now we can go and change the sides of those circles
CES all right so that looks nice now the next step is that we're going to go and put it on top of each others and we can
do that using the Dual axis so let's go to the sum of sales on the right side right to click on it and let's select
the Dual access so now with that you have very nicely those circles on top of our line but the colors are not correct
yet because those two axes are not synchronized so let's go to the right side right click on it and synchronize
axis so now we got those circles perfectly in our lines I would like to hide the right Axis so right click on it
and let's hide the header so now the next step we can go and add numbers on those circles so I'm going to stick with
the second measure on those circles let's go to the labels and show label and the next step I would like to add
those numbers inside the circle so go to alignment over here and then the vertical and let's make it to the center
so with that we got those numbers inside the circles and we can go as well and change the coloring and the font over
here let's make it white and now with the next step I would like to go and change the sizing again of those circles
so let's make it a little bit bigger until it looks nice all right so that's enough and with that we got a really
Professional Pump chart and we are controlling the sight of those circles so now we can go and very nicely check
the ranks of those countries as you can see France was in the first data points they rank number one then it dropped to
two then three then back to one and we can see the development of those sales between countries and we can see very
nicely that Italy is always the lowest rank in the sales in our business all right so this is how we can create pump
chart a tableau all right so now we're going to learn how to create spark line chart in
Tableau spark line charts are really like compact visuals in order to show the trends the changes over time and
you're going to find it in a lot of dashboards in order to show KB eyes so now let's see how we can create that
it's really simple so now we're going to take a dimension like the country and put it in the rows in order just to
split those lines to smaller size so now in the spark lines it's very important to have the informations of the sales at
the start and at the end of each line so let's go and do that let's take the sum of sales drag and drop it to the labels
over here holding control so now we have the information of sales on each quarter in each data point we don't want that so
let's go to the labels over here and now let's go to the Min and Max let's go select dots so now we can see that we
have for each line two values the minimum and the maximum but here it depends really on the sum of sales so
instead of that I would like the Min and Max depends on the value of the order dates so let's go and switch that we're
going to go to the field over here instead of automatic let's select the quarter so now as you can see with that
we got exactly our spark lines we have the starting value and the end value of each line but now usually the Sparks
lines are really compact visuals they are really small lines in order to change that let's switch from entire
view to standard and now now we're going to go very carefully to the end of our axis until we get the resize of our
Mouse then now let's go and completely reduce it so with that we got our compact lines I would like as well to
remove those lines in our charts so right click on it over here and go to format and then here on the left side
we're going to go to the lines we are at the rows so I would like to remove those rows so make sure to select the rose
tabs and removing those GD lines we're going to go over here and select none and with that we got really clean spark
lines without any grids and as well we can go and hide those informations about the sales so let's go right click on it
and show header let's disable it so that's it now I'm happy with that we got a very nice spark line chart in Tableau
and as you can see there are compact visuals in order to quickly identify Trends which we usually use it inside
qbis all right so now we're going to go more advanced on building visualizations in Tableau we can learn how to create
parle charts in Tableau parle charts are really amazing in order to compare two data points and find the differences
between them it's like before and after and it works perfectly if you have categories so now we would like to
compare two years 2021 and 2022 by the categories so now let's start first with taking the subcategory not the category
in order to have more values and now next we need two measures the first one for the year 2021 and the second for 202
to in order to do that we have to go and create new calculated field so let's go to the data pane click over here create
new calculated field and now I'm going to call the first one sales 2021 and the form going to be very easy so we're
going to use the if condition if the order dates but now we are talking about the year of order dates so let's move it
to year so if the year of the order dates equals to 2021 so now what can happen if the condition is correct we
we're going to show the sales so then sales and otherwise going to be null so that's it let's go and end it so now in
this calculated field we will get the sales only if the year is 2021 let's go and copy it because we need it for the
next one so that's it then hit okay and with that we got in the datab ban new calculated measure for the sales 2021
let's go and create for the next year it's going to be the sales of 2022 paste the same calculation but now
we're going to say if the year is 2021 then show the sales so that's it let's hit okay so with that we got our second
measure for the sales of 2022 now we want to compare both of those sales in our view so let's take the sales of 2021
to our columns and now in the purple charts we're going to have like two circles and between them a line in order
to find the differences so first let's start with the circles instead of having bars we're going to go to the marks over
here and change it to Circle so with that we got in our view the first Circle for the year 2021 what is missing now is
the second Circle so in order to do that we're going to go and get our sales 2022 move it to the axis in order to generate
the measure values and measure names so just drag and drop it over here and now with that we got our second point so the
first one the blue one is for 2021 and the second one is 2022 all right so with that we have built the first part of the
parle charts where we have the starting point and the end point so now in order to show the differences or the distance
between those two values we have to have a line chart between them so that means we need now another type of chart inside
our view in order to do that we're going to go and duplicate the measure values so hold control drag and drop it and
just put it beside it so now with that we have the same data on the left and on the right on the right we're going to
have now different visual so instead of circles we're going to have line so let's go to the tab over here on the
marks to the second one and now we're going to go and change the visual from Circle to line so with that we got our
lines but we are not there yet I would like to have a distance between two values in order to do that we going to
take our measure name from the colors and we're going to go and put it on the path so drag and drop it on the path and
with that we got exactly what we want we have now like a line between two points all right so now the final step is that
we're going to go and merge those two charts in one so in order to do that as we learned we're going to use the Dual
axis so let's go to that measure values over here on the right side right click on it and dual AIS let's select that so
now we got a perfect line to show the distance the difference between the starting point and the end point but now
we still have small issues in the visuals I would like to make those circles little bit bigger so let's
switch to the circles and go to the sides over here and make it little bit bigger all right so that's enough and
now as you can see the line is on top of the circles which is not really correct in order to make it in behind we have to
go and switch the order of those dual axes so let's take the right and put it on the left all right so with that we
got a perfect parle chart in Tableau and we can go and analyze the differences between two data points between the
sales of 2021 and 2022 and we have this very nice line in order to indicate the distances between them so you can see
for example in the envelopes there is no change on the sales between those two years but if you go to the phones over
here you can see a huge change on the sales between those two years and in the visuals it really indicate those
informations so that's it this is how you create and why we create Barber charts in
Tableau all right so now we're going to go and build a rounded bar charts previously we have learned how to build
bar chart standard ones but now we're going to go Advanced and build build rounded part charts and we will use
lines in order to do that I know it sounds a little bit strange but let's go and build that first we're going to go
and get as usual the subcategories in order to make a rank and I'm going to stick with the entire view in order to
have the whole view over here then let's go and get the sum of sales to the columns over here so now as you can see
this is very nice standard bar charts so now instead of having those classical bars we're going to have rounded Edge
bars at the start and at the end so how we're going to do that we're going to go and have like a dummy value average of
the zero so now what we're going to do we're going to go and merge those two measures in one single axis so in order
to do that let's drag the average and put it on top of the sales over here in order to generate the measure values and
names so now we're going to go and confer the bar chart to a line charts so let's go to the marks over here to the
line and then what we're going to do we're going to take the measure name and put it on the path so now we are almost
there what we're going to do we're just going to go and increase the size of those lines so let's just make it bigger
and with that as you can see we got rounded bar chart in Tableau and as well we're going to get very nice color
effect if we take the measure values hold control and then drag and drop it through the colors and with that we got
really nice rounded bar chart in blue well if you ask about now the use case it's exactly like having standard bar
charts for example here we can make a ranking list of the subcategories we just change the visual of it so that's
is how you can build rounded bar chart in Tableau all right guys so now we're
going to learn how to build slobby charts in Tableau slobby charts are perfect in order to show how the ranking
is changing over time for different categories so let's see how we can do that since the ranking over time that
means we need the order dates so let's go and bring the order dates to our view then the next as usual we're going to
get our measure the sales to the row so here we want to compare the last two years so in order to do that let's go
and filter the data so show filter for the years and let's go and select the last two years so now we have to decide
which category you want to compare you can go for the product categories we can go with the countries so let's go and
pick the country and put it on the details so now the next one I'm going to go and just make it a little bit bigger
in order to compare those two years the next step that we're going to go and put the category or the country on the names
so let's control on the country and drop it on the labels so now we can see the country name on the end of each labels
but I would like to have it as well at the start in order to get the slobby chart so let's go to the labels so now
what we have to do is to put the labels at the line ends so instead of having allal let's switch it to line ends and
let's close it so now we can see that each line start with the country name and ends as well with the country name
and now the last that we want to add for each line like small circle in order to do that as we learned before we go to
the colors and we put the markers so now we have a small circle at the start and at the end of each line and this is the
easiest way in order to build sloy chart in Tableau so again the use case of the subby chart is that we can see how the
ranks are changing over the time so in 2021 you can see France far as as a first then USA Germany and the last was
Italy and now we can see the change over time in the 2022 Germany went from place number three to be place number one and
then France moved to number two USA moved to number three and as you can see Italy nothing changed so this is the
power of the slobby chart in order to see how ranking are changing over the time and of course in Tableau we can go
more advanced where we add more complicated stuff in order to have more customizations for example you say you
know what I would like to have bigger circles so in order to do that we have to have two sharts one for the line and
one for the circle let me show you how we can do that let's take the sum of sales hold control and
duplicate it so the first one going to be the lines and the second one going to be the circles so let's go and switch
for the second measure and instead of automatic we're going to select here the circle it's two way big for our visual
let's go to the size over here and just reduce it in order to have smaller circles and as well a little bit more so
that's it now what we're going to do we're going to bring those two charts in one so let's go and merge it using the
Dual axis so I'm going to go to the second one over here right click on it and then
let's go to the Dual axis then if you look closely those axes are not 100% synchronized so what we're going to do
we're going to right click over here and then synchronize the aess so now we got the circles exactly in the place that we
need so since we have two axes that have the same informations I'm going to go and hide one of them so let's go and
disable the show header and now you got the full customizations of the charts you can say you know what for the lines
I would like to have another color for example let's have a gray color or you might say let's make it a dash line so
we go the bath over here and move it to the dash line so with that we get full customizations on our chart but usually
for the sloppy charts we have a solid line between so that's said this is how we can create slobby chart in
Tableau okay so now we're going to learn how to combine different types of charts in one single View and here we're going
to mix the bars with the lines there are different methods on how to do that depend on the use case the first one is
using the average line so first let's go and build a standard bar line of the time so in order to do that let's get
the order dates to the columns and as well the sales to the rows and then let's switch the years to a continuous
month so let's change the formats and now instead of having the line we're going to go and switch it to bar charts
so let's go to the marks and switch it to bars great so with that we have got our bar chart the second step is to add
line this line going to be the average line in order to do that in Tableau it's very simple let's go to the analytics
and here we have the option of average line let's go and drop it to our view so it's going to be for the whole table and
that's it as you can see it's very easy with that we got a nice average line combined with the bar
charts all right moving on to the next method we're going to go and combine the bars and lines using the Dual axis and
here we're going to go and compare two different measures so this time as a change we're going to go and compare the
number of orders together with the number of customers so now let's go and get the order date in order to see the
changes over our time and then the next thing we're going to go and get the order the count of the orders to the
rows and now let's go and change the format of the order date to months and then change as well the chart to bars so
with that we got our first chart the par chart let's go and get our second measure and we're going to have it as a
lines in order to do that let's go the count of the customers put it near the rows so with that we splitted our view
to two charts let's go and change the second one two lines so we're going to go to the marks switch to this page and
then now instead of having bars we're going to switch it to line so now we have our two charts the bar chart and
the line chart and as usual we want to go and merge them together in one single view so in order to do that we're going
to use the Dual access let's go to the customers right click on it and then choose use dual axis so with that as you
can see we have a bar chart together with a line charts and of course here with the Dual axis we can go to the
right side and synchronize those two axes but for now it makes no sense and of course now we can add more
customizations for example for the line we can do the markers so let's go to the colors over here and let's just add the
markers to it so that's it now we can go and start comparing the number of orders together with the number of customers in
one single View using two different charts types okay so now we're going to build
the bullet chart in Tableau here we're going to combine again bars with lines bullet charts are really important in
order to compare the current value with the Target or compare the current year with the previous year so now let's go
and get as usual our subcategory to the rows and now I would like to compare the current year with the previous year so
let's take the sales of 2022 from our data pane over here to the columns and now let's go and sort it by the axis so
we have like a rank and then we're going to go and compare it to the sales of 2021 so what we're going to do we're
going to take the 2021 to the details and then we're going to go and add a reference line so let's go to the access
to the sales of 2022 right click on it and let's add a reference line so now let's take it little bit to the right
side in order so to see those L shines so what we going to take instead of the sum of sales 2022 we can to have the
2021 so let's select that and now we got one line for the average we don't want that we want to have the total sales for
each subcategory so in order to switch that we're going to go and say instead of perer pan we're going to have it
perer cell so let's switch it so now we got a line for each bar which is great but let's go and customize those
informations I don't want to see any labels so let's go to the labels and switch it to none and then let's go and
format those lines we're going to go over here and let's take for example the orange color and then let's go and
change the transparency to 100% to have a full line and then let's go and make it more heavy in order to see the lines
I'm just going to go with the full so that's it so let's go and close this and as you can see with that we got very
easily a pullet charts in Tableau where you can compare the current here of the bars with the lines of the previous year
so this is how you can create a very nice bullet chart by combining bars and lines
all right so now we're going to learn how to create lollipop chart in Tableau there are two type of dots rontal and
vertical we can use this type of charts by combining the pars and circles so it's like a stick and at the end we have
big circle and we use the circle in order to highlight a data value so let's go and create that it's very simple
let's take the subcategories to the rows and then our measure going to be the sales as usual let's put it on the
columns so with do we have we have already our bar charts if not then go to the marks and change it let's go and
sort it in order to have a rank so since it's lollipop we going to have sticks so let's have smaller bars let's go to the
size over here and just reduce the size so now what is missing in the lollipop is the End Circle so in order to make
another chart what we're going to do we're going to take the sum of sales as well and duplicate it so hold control
and just drag and drop the sum of sales so with that we got our two measures and what we're going to do next next we're
going to go and change it to circles so let's go to the marks to the second sum of sales and instead of automatic we
going to have the circles so now we got very nicely those circles but they are really small so let's go and make it
bigger little bit smaller all right so maybe this is fine so what is the next step in order to merge two charts
together in one single view as usual we're going to use the Dual aess so let's go to the second sum of sales
right click on it and then let's go to the Dual AIS so as you can see things got destroyed we don't have any more the
bars and that's because in the first measure of the sum of sales we didn't specify for Tableau that is bar it was
an automatic and with this Tableau going to go and make guesses on the suitable visual for the current data which is
something that is wrong so what we're going to do we're going to go to the first measure and say for Tableau it's
not automatic we want it always to be as a bar so let's switch it so with that as you can see we have already the shape of
the lollipop we have to do some few stuff that is not a big deal so we forgot about synchronizing the axis so
let's go to the second one right click on it and let's synchronize it just to make sure that everything match
correctly and now I have those two aess that have exactly same information so I'm just going to go to one of them and
hide those informations in order to have it only once so now the key thing of the lollipop is that to show information at
the end at the Circle so here we can put anything like any measure for example we can have the total sales or the total
number of orders and so on but in this example I would like to have the text of the subcategory on those circles so how
we're going to do that we're going to go to the circle over here and we're going to put in the labels the subcategory so
by holding control and putting the subcategories on the labels so now as you can see we have now the headers
informations on those circles so what we can do we can go now and hide those informations so right click and show
header with that we have removed those S informations and we have now the header informations or the subcategories on the
circles one more thing that we can do we can go and add coloring so let's take the sum of sales and put it on the
colors so with that we have a really nice rank chart for the subcategories okay so now let's see quickly the second
type we can have a vertical lollipop chart I just duplicated the previous one and all what we're going to do we're
going to go to the quick menu over here and switch everything between the rows and the columns all right so now we have
everything vertical but we have really big circles so let's go and change that let's go to the second sum of sales and
go to the sides let's try to reduce stuff over here and we can reduce as well the sticks so let's go to the first
sum of sales to the size and as well let's try to reduce the sticks so now it looks really nice but still we have a
problem with the labels so let's go again to the circles go to the labels and we're going to change the alignments
for from automatic to on top so we're going to go and change that so now we have the labels on top of those circles
but still we don't have all the labels because the size of the text is really big so let's go to the fonts over here
changes from 10 to 8 one of them is missing you can go and reduce the size of the circles so that's it this is how
you can create lollipop charts in Tableau and here you can see the power of Tau we can go and combine different
type of charts in one single view like here we are combining the Circ with the bars so that means we have endless
amount of combinations and this opens the Innovations in Tableau where you can create amazing charts and visuals and
this is exactly the magic of Tableau all right so now we're going to talk about the area charts in Tableau
they are like the line charts we can use it in order to see how the data are changing over the time but under the
line we're going to get a filled area in order to make it easier to visualize those numbers so now we're going to
start with a very basic area chart in Tableau since it is change over time we're going to get the order date to our
view and then as usual we're going to get the sum of sales to the rows and instead of year we're going to switch it
to month continuous and now here we have it as a line because it's automatic if you go over here to the marks you can
see we have a chart type called area let's go and switch it so this is the most basic area charts that we have in
tableau okay so now we might say you know what the basic area chart in Tableau don't
have a line and usually the area chart has a line and between the line and the axis we have like a filled Gap but the
basic area chart in Tableau don't have this visual in order to recreate this design what we're going to do we're
going to go and create a line on top of our area charts so here we're going to have two types of charts the line and
the area so let's go and create that we're going to take the sum of sales and duplicate it by holding control so now
we have our two charts the first one going to stay as an area chart the second one going to be a line chart so
let's go to the second one of the sum of sales instead of area we're going to have a line and I think you already know
the next step we have to go and merge those two charts in one single view so how we going to do that using the Dual
access so let's go to the second sum of sales right click on it and let's choose dual access and now the next step we're
going to go to the area chart and just reduce the opacity so let's go to the colors and now let's go and just reduce
the Obesity and with that we're going to get a perfect area chart in Tableau where you have a line and between the
line and the axis you have a field gap which is way better than the basic area chart in
Tableau all right moving on to the next one we're going to have the Stacked area charts it's like the bar charts we can
add more informations to our visualizations by adding the dimensions to the colors so now we have the basic
area chart at the start where we have the sum of sales and the month over the time so now we're going to go and add a
dimension let's take the category and put it to the colors so with that we got three area charts stacked on top of each
others because inside this Dimensions we have three values so what we can do over here about the design we can go to the
colors over here and increase the opacity so really that's it this is how you can create stacked area chart in Tau
all right so next we're going to go and build full 100% stack charts so here if the total of the sales is not important
but what is important is to go and compare those different categories together we can go and use the full
stack charts so let's see how we can do that we're going to go to the sum of sales and we're going to switch it to
Quick table calculations percent of total so let's go and click on that we are not there yet as you can see we have
the percentage over here on the left side we want to have it from 0er to 100 so in order to do that we're going to go
again to the sum of sales right click on it and let's edit the table calculations and now what we're going to do we're
going to switch it to specific Dimension and this Dimension going to be the category so let's deselect the months of
order date and let's go and close it so with that you can see the area now start from 0 to 100 and you have it like one
block and now we can go and very easily compare the three different categories and here we can see very clearly how
each category is relating to the whole to the total sales of each month so this is how you
can create very easily a full or 100% stack chart in Tableau all right so now we're going to
go and create small multiple area charts by adding multiple Dimensions so now let's go and get the First Dimension
it's going to be the country to the columns let's go and get the order dates as well to the columns and then to the
rows we're going to go and get the categories so those are our three dimensions and then I'm going to go
switches from standard to entire view now let's go and get the numbers inside our view so it's going to be the sum of
sales let's put it in the rows so as a default table we're going to show it as a lines let's go and switch it to areas
to the marks so with that we get our mini area charts in Tableau but now let's add more details where we want to
see the months so let's go to the year over here and change the format to continuous month so let's switch it and
then next we're going to go and add the the coloring so let's control and drag and drop that country to the colors and
in such visualizations it make no sense to have those grid information so right click on it let's go to the formats to
the lines make sure to select the rows and then the grid line over here and make it none so with us we have created
small multiple area charts in Tableau it's very similar to the lines or to the bars okay so now we're going to learn
how to create the Scatter Plots into Tau cutter plots are one of the fundamental charts in order to understand the
relationship between two continuous measures so that means the main task of the Scutter plots is to find
correlations between two continuous Fields And as well another task of the Scutter blot is to find the outliners
inside your data so let's go now and create a very basic Scutter blots in Tableau and as I said we need two
measures in order to do that so our two measures going to be the sales and the profit so let's get the sales to the
columns and as well the profit to the rows so with that we got our two axis and it going to represents a twood
dimensional graph so now what is missing is of course our data the data points so here we're going to go with the customer
ID so let's take the customer ID and now we're going to go and put it to the details and here is the power of Tableau
compared to any other tools where Tableau going to go and plot all data points that we have inside our data
without any restrictions so with that we can see the Cor relation between the sales and the profit and as well to find
the outliners for example those points that we have it as a standalone all right so with that we have created the
very basic scatter blots in Tau all right so next we're going to go and add more stuff to the design of the
Scutter blots where we're going to change the colors the size add circles and so on so now we're going to go and
change the size of each data points but it's going to depend on a third measure the count of orders so now let's go to
the orders counts and drag and drop it to the size each customer is going to has different size and that's going to
depend on how many orders did this customers place so this is one thing that we can add to our scatter blot
another thing we can add coloring so here we have different ways on how to add colorings either we can add a
dimension or we can make a cluster so now for example let's go and get the dimension country and place it on the
colors and here in the data points we can add as well different shapes in our visual So currently we have the circle
for everything we can take the country drag and drop it to the shapes and now we can see in the scatter blot not only
that the countries has different colors but they have as well different shapes but what we usually see in the scatter
blots of that each data point can to be represented as a filled Circle so that means we're going to go and change the
visual let's go to the marks over here and then change it from shapes to circles so now as you can see we have
everything as a filled ccle Circle but we are not there yet let's go and make the sze a little bit bigger and now what
do we have over here we have a lot of points and what we usually do we go and reduce the opacity of the colors so
let's go to the colors over here and let's just reduce it and with that you can see very nicely for example those
two points there is like overlapping between them one more thing that we can add to those circles we can have like a
line border for each circle so in order to do that we're going to go again to the colors and here we have an effect
called border so instead of automatic let's have something like this color of the gray so with that you can see we
have a very nice border for each data point all right so those are some different options on how to customize
the Scatter Plots okay so now we're going to create the dot blot in Tableau dot blot is
onedimensional graph in order to see the distribution of your data between different categories and each dot going
to be presenting one data point so now let's go and see the sales by the order date and then we're going to have the
order ID As a detail so we're going to take the order date to our rows so now we're going to go and see the
distribution of order IDs by the date so let's take the order dates to the rows this time and let's go and change it to
a month as a continuous then we're going to go and get our measure to the columns and now as a default we have it as a
line instead of do we're going to go and make it as circles so now we are not there yet we have to add more details to
The View and that by moving the order ID to the details so now since we have a lot of orders inside our data sets tblo
going to ask us do you really want to do that well yes add all members so now as you can see we have a very nice Dot Plot
we can add more informations like for example let's take the category and put it to the colors and as well since there
are like a lot of overlapping we can go to the colors and reduce the opacity so now with that each data point each
circle going to represent one order and you can see now very clearly and very fast which orders has the most sales so
this is how you can create dotplot in Tableau all right so now we're going to learn how to build Circle or bubble
timeline we usually use the circle timeline in order to analyze the changes of our time and we usually use it to
show the distinct values of different circles across multiple categories so let's see how we can build that since we
said it is change over time we need a date so let's go and get the order dates to the columns and then we need one more
Dimension let's take for example the subcategories to the rows and then we need our measure it's going to be the
sales but now instead of dropping it to the columns or to the rows we're going to drop it on the size since each data
point going to has different size so table going to show it as squares let's go and switch it to circles and now in
order to have more data points in our view we're going to go and switch to the years let's take for example the quarter
as continuous so let's click on that so now I'm going to go and change the size of our view I'm just going to go to the
header and make it a little bit bigger and then we're going to go to the axis and just make it a little bit smaller in
order to have some overlapping so now let's go to the size and increase the size or make it a little bit smaller and
then we're going to go to the colors and reduce the opacity and now we can add more customizations about the design
like for example let's say the sum of sales and put it to the colors and then let's increase as well a little bit the
opacity so it looks better and as well depend on how you like it maybe you can go and add some borders so let's go to
the borders over here I like the dark ones so maybe I'm just going to go and make it more gray course here you can go
and customize different stuff for example you can go and use two measures so for example instead of having the sum
of sales on the colors we can go and get the sum of profit so let's go and get the sum of profit on the coloring so now
we can see in this one chart we can see a lot of stuff the change over time we can see as well the coloration between
two measures in order to understand the relationship between them where the size going to indicate the sales and the
colors going to indicate the profits so this is really powerful and very great analyzis in Tableau using the circle
timeline all right so now we're going to talk about the pie chart in Tableau it is very easy and common way in order to
analyze or show the part to hold data so let's see how we can build that on Tableau there is like an easy way or
sheating way in order to do that if you go to the show me over here and then click on the pie charts we will not do
that we will create it on our own so that we understand how Tableau works so let's not take the shortcuts I'm just
going to close it so in order to build a pie chart in Tableau first let's go to the marks over here change it from
automatic to a p so with that we get a small icon called angle and here we're going to go and drop our fields on top
of it so here in this example we're going to build a pie chart from the sales and then split it by the country
so let's take the sales and put it on the angle and with that we got our first chart it is like a circle and it's not
divided yet let's switch from standard to entire view in order to get a bigger pie chart and then the next step we're
going to go and divide these pie charts into sections so our Dimension going to be the country let's go to the customers
then grab the country and let's put it on the colors so with that our PI is divided to multiple sections and the
size of each section can to indicate the sales of the country and this type of charts is used in order to analyze the
part to hold so for example here we can analyze how the USA is contributing or relating to the whole of sales so as you
can see it's really easy to build and very commonly used in many dashboards we can go over here for example and add
some labels and change the design of course of these pie charts and one more thing that I would like to show you is
that sometimes in the dashboard you can see that there are multiple pie charts in One dashboard in one view in order to
do that you just grab any dimensions and put it to the rows or to the columns so for example let's take the category and
let's put it on the columns and with that we got immediately three part charts under the three different
categories so this is how we usually deal with the pie charts we have one dimension that split the pie charts and
another one that is duplicating those pie charts all right guys so that's all for the pie charts in
Tableau okay so now moving on to the next one we have the donut charts donut chart is very similar to the pie chart
you still have this analyzis of part to whole you have a circle and you have different segments but many people
prefer to use the donut chart and that's because we can add an extra informations to the circle all right so now in order
to build it we need two charts the first one going to be the pie charts and the second one going to be the empty space
in the middle so let's start with the pie charts as we learned previously we have to switch the automatic to a p
charts then we take our measure going to be the sum of sales to the angle and then next we're going to take the
divider it going to be the country to the colors and with that we got our byy chart okay so now next I'm going to
switch from standard to entire view so this is for the first chart now in order to get the empty circle in the middle we
have to create another charts inside this view so now we're going to go and create our empty measure just to have
second charts so in order to do that let's go to the columns over here and write average of
zero so now we still in the marks we have only one visual in order to get a second one we will go and duplicate it
so now with that we got our two measures one for the pie chart and the second one going to be for the empty space so now
what we're going to do we're going to go and merge those stuff together in one place because we have to have only one
Donuts so right click on the average and let's go to the Dual AIS and as usual we're going to go and synchronize stuff
so let's go and synchronize the axes and now let's go and get rid of them we don't want them so show header away and
as well from the bottom so now we have the two charts in one place it's a little bit small so let's go and make
things a little bit bigger so let's go to the sizes and just make it bigger in the middle all right so now let's go and
make the empty space in the middle so let's switch to the second marked over here and now the second chart it will
not be a pie it's going to be like a circle so let's go and switch it to a circle and let's get rid of all those
informations and now if you check our view we don't see the pie chart and that's because we have overlapping and
the pie chart is behind our Circle so now in order to show it what we're going to do we're going to go to the circle go
to the size and now let's go and start reducing the size of the circle and as you can see now we are getting the shape
of donuts but our donut should has in the middle white color so let's go and change the circle color to white perfect
now we got the donut shapes in our view but now let's go and get rid of all those lines so right click over here in
the empty space go to format then let's go to the left side let's start with the lines over here so the zero line let's
go and switch it to none and then we still have on the column one more line let's switch to the columns instead of
the grid line let's move it to none and then in order to get rid of those borders let's switch to the borders then
let's go to the row divider make it none and as well for the column divider it's none and with that we got very clean
donut shapes in Tableau now let's add some labels and some data to our donut charts so let's go to the pie chart
first here we're going to get the informations of those sections so what we're going to do we're going to bring
for example the country to the labels and as well we can go and get the sum of sales like hold control and drag and
drop it to the labels as well now we can go and change the font format of course if we go to the labels over here and
then click on the three dots then let's make for example the sum of sales bolds and that's it so so far there is nothing
new compared to the py charts we are just showing the informations of each sections but now here comes the power of
the donut charts we can give an information here inside this white circle and it's going to be usually the
total of the measure the total sales so now let's go and switch to the circle over here let's go and get the sum of
sales and put it to the labels now you can see the sum of sales here strangely on the right side because we didn't
customize it yet so let's go to the labels and then let's go to the alignment over here and make it
everything to the middle so with that as you can see we got the total sales in the middle let's go and customize the
text a little bit so let's go inside so now what we're going to do we going to write the total sales at the start and
then we can to make everything like P for the real number the real values and let's make everything a little bit
bigger so 16 and click okay so now as you can see we got now another information to the bar charts where we
have the total sum of sales in the middle and then we can see very nicely the different sections around this
number so that said this is how you can create donut charts in Tableau and this type of chart it is like way more used
than the pie chart since you can add one extra informations in the middle Okay so so now we have another
chart in order to analyze the part to whole using the tree map we usually work with the tree maps in order to show the
hierarchal data inside our data sets so let's see how we can build that let's first start with the marks let's go and
switch it to squares The Next Step we're going to go to the sales and we going to put it on the size with that we got one
blue square for the total sales inside our data now of course we want to go and split this Square to multiple
informations and here we're going to work with the hierarchy of the the products so let's start with the First
Dimension the category let's drag and drop it to the colors and as you can see we already got now a tree map so the
colors of the tree map is decided from the category and the size of those blocks can to be decided from the sales
now of course in this three map we want to represent the hierarchy so the next Dimension going to be the subcategory
but this time we will not move it to the colors we will move it to the details so let's go and do that so now as you can
see each of those blocks are divided to more blocks where we have the subcategory informations so that means
the data will keep splitting in the tree map the more Dimensions we add from the hierarchy so for example let's go and
grab the product name and let's put it to the details and now we can see that we have a lot of manyi blocks that
represent the product name so with that we have represented our hierarchy of the product inividual in a tree map and we
can see that each category for example the red is splitted into multiple subcategories and each subcategory is
splited further more to products but of course the disadvantage here is that the more details you add the harder going to
be to read this visualization so I don't recommend you to go with the product name in such a visualizations it should
be enough with the category and the subcategory and of course like any other charts in our visualizations we can have
multiple tree maps in one view by adding a dimension to either columns or rows like for example let's go and get the
order date to the rows and with us we got multiple tree Maps splitted by the years which is really useless to have
such a visualization so let's go and remove it okay so now we're going to talk about
the heat map it is like a matrix where you have colors inside it and we usually use it in order to do colorations
between two categories so let's see how we can build that we need two categories that means we need two Dimensions so
let's say the first one going to be the country let's drag and drop it to the columns and then the second dimension
going to be for example the subcategory let's drag and drop it to the rows and with that we got our Matrix let's switch
to entire view so we have rows we have columns now what is missing of course is our measure the data so now in order to
create the effect of the heat map we're going to take the sum of sales and let's put it to the colors and now with that
we got our heat map and we can see from the colors the coloration between the countries and the subcategories where we
can see immediately that the high highest sales where we have the dark color so for example we have high sales
from the country France and as well from the subcategory phones and the lowest sales we can see it for example here in
the envelopes and Italy where here we can see again the power of visualizations where we can read now the
trends and the colorations between our data which is way better than having only numbers but of course if you want
to add some numbers in this Matrix we can go to the labels over here show marks and if you want to make it to the
middle let's go to the alignments and let's make everything in the middle so that's it as you can see it's really
simple and this is how we can create heat map in Tableau bubble chart in Tableau they are
really great way in order to add a lot of dimensions and measures in one single view so bubble charts are like circles
and we can define a lot of stuff in the circle like the colors the size we can put inside it a text so let's have an
example we're going to start with the marks so instead of automatic let's go and switch it to circles since
the bubbles are circles so let's start with the first information we're going to go and get the measure Sals and let's
put it on the size so with that we got our first small bubble or Circle let me switch it to entire view so now we have
one information the total sales inside our data let's add another information like a dimension so let's go and add the
subcategories inside our view so I'm going to take this Dimension and let's put it on the details so now as you can
see we got more bubbles and we're going to get a bubble for each subcategory now all right so now let's keep adding more
informations to our bubbles let's say that I would like to add the coloring for the bule and this should come from
another measure let's take the profits and let's put it to the colors so now with that we got different colors
depends on the values from the profit and now how about to add one more informations inside those bubbles let's
say the category so let's go and get the dimension category and now let's put it on the labels so now we can see the
category of each bubble of each subcategory so now as you can see we have four different informations that we
have inside our bubble the first one is the colors of the bubbles indicates the profits and then the size of the bubbles
show us the sales information and then the number of those bubbles are decided from the subcategory so we have all
those subcategories inside our data and finally the text inside the bubble comes from the category so this is the power
of the bubble chart where you find a lot for formations in one view okay so now we have another fun one
called stacked bubble charts so here we're going to add a lot of dimensions in the details so let's see how we can
build that let's go to automatic as usual then switch it to circles let's take the sum of sales and put it on the
size we are just creating again our PES and this time we're going to go and get the country and let's put it to the
colors so so far we have those four colors for four countries so now if we bring any diamond the details it's going
to split this bubbles to more small bubbles and that's depend on the cardinality of the dimension for example
let's take the category it has very small cardinality and with that we will get just few bubbles so if we go and
remove it let's take the subcategory and now as you can see we are getting way more bubbles than the category and
that's because we have more data inside the subcategory and now let's go with higher cality so let's just remove the
subcategories and let's get for example the BR T name so once you do it you will get a lot of small bubbles and they are
all stacked together and of course you can go and sort the bubbles differently if you go to the country over here right
click on it and let's go to sorts let me just move it to the left side a little bit and if you Chang the sort as you can
see the color is going to change as well so here you can go and sort the bubble as you want and now of course we can go
with more details if we take the lowest level of details the order ID so let's drop the product name away and let's go
and get the order ID and with that de going to ask us do you really want all of those data yes add all members and
now you will get for each order a small bubble inside our visualizations okay so this is another way on how to represent
your data in visuals using the stack double chart but if you look at it you will find it's looks like the sa eye
eyes all right so that's all for the Stacked bubble charts okay so now we're going to talk about
Tableau Maps first let's get the data in order to plot the maps so let's go and create a third data source I am at the
data source page let's go over here in this small icon new data source and then let's go to the text file and then to
the data that we downloaded so let's go to the big folder and then we have over here USA sales so let's select this CSV
file and click open so it's really simple table where we have the orders country region State and sales so that's
it let's go back to our View and let's create now a very basic map in Tableau so again we can go and using the
shomi but we're going to go and create it from scratch so now if you have a look to our data ban you can find that
we have two automatically generated Fields the latitude and the longitude they are geographical coordinates in
order to plot the map the Earth so the latitude is responsible to plot the horizontal lines and the longitude is
responsible to blot the vertical lines so what we're going to do we're going to go and use them to the columns let's
take the L itude to the columns and the latitude to the rows so with that you can see that tblo is now able to plot
the Earth and now next we have to specify for Tableau the country the states those geographical informations
so let's take for example the country to the details and with that you can see that tblo is now focusing only on the
United States because we have only informations about USA so now let's take the states as well and putot it the
details and now as you can see tblo is focusing now with those points on each States all right so now the next step
instead of having circles I would like to have a map chart so let's go to the marks switch it from automatic to map
and with that we have the whole area covered with the colors so now you can go and add coloring depend on the
dimension that you want so for example we can go to the region over here and put it to the colors so now we can see
that the map is now splitted by the regions so now what is missing here is the sales informations so let's go and
get the sales but here we have small problem that the sales is dimension and discret because of the data type so
let's go and switch it to a number hole and then make it continuous so convert to continuous and then the last thing we
have to convert it as well to a measure because it still has a dimension so everything is fine let's go and get the
sales to the labels and with that we got very nicely the total sales for each state so this is how you can create a
very basic map in Tableau okay moving on to the next one we can create map in Tableau with symbol
so I just duplicated the previous one let's go and switch the visual from map to for example circles and then the size
of the circle going to be decided from the Sals so let's take the Sals and put it to the size and then the next step
let's go and make the circles a little bit bigger and now we can add another measure to the circles let's say the
number of orders we're going to take over here the count of the USA CSUS V so let's take it to the colors so now the
scale of the color going to define the number of orders and the size of the circle going to be defined from the
sales so this is one way in how to represent those informations as the circles or bubbles we can go and choose
different shapes so let's go over here in the marks and go to the shapes you can go for example with let's say what
we can have over here let's go with the Stars so as you can see we have here a lot of options on which symbol can be
presented inside our map so this is how you can add symbols to the maps in tableau
all right guys maps in Tableau are very rich in the customizations there are a lot of options on how to BL the maps in
the view so now I'm going to show you a few possibilities on how to blow the maps in Tableau the first one is about
how to have a map without any background noises so now let's go and do that if you take the country field and just drop
it here in the middle T going to understand we are talking about map and we're going to get automatically
everything inside the columns and the rows so now the next step let's take as usual the states over here and then we
going to go and color it with the region of the colors so now if you check the map you can see there are a lot of grade
out areas inside the map that is not used directly so if you want to remove all those informations what we're going
to do we're going to go to the main menu you have here Maps options and then here we have a background layers let's go and
click on that and then here on the left side we will get many options in how to customize the maps I really recommend
you to go and click around it's really fun to work with maps in Tableau so now the task is to remove all those
background informations what we're going to do we will just remove all those selected information so let's just
remove everything and with that as you can see we have removed the background and we have only the relevant
informations inside our view and there is another way on how to remove the background let me just go back with all
those settings so I think with that we got all informations back another way to remove the background informations to go
to the wash out and move it from 0 to 100 so now as you can see the background inside our our map did disappear so this
is how we can remove the background informations inside our map and you get really a clean map in order to focus on
the relevant data okay the next one is as well about customizing the maps in Tableau so now
let's go and create a night vision map it is just fun to work with maps in Tableau so let's go again and get the
countries in the middle the states to the details so now in Tableau we have different types of maps not only one so
if you go to the main menu over here to the maps either you check the background map so here we have the different modes
or if you go again to the background layers and on the left side you can see here the Styles So currently it is white
and gray it's light so if you click over here you can find the different model we have the normal one and then we have
stuff like dark Street outdoors and satellite informations so it's really nice to have different styles what we're
going to do now since it's night vision we're going to go with the dark modes so now the next thing I would like to
reduce some informations like United States and Mexico let's go and remove those stuff from the left side and then
what we're going to do we're going to go and add some measure to our view so let's close the background layers over
here let's go and get the Sals to the size so with that you are getting those nice circles let's make it a little bit
bigger and then we can add the sales as well to the colors so hold control put it on the colors and let's change the
coloring so let's go and edit colors and now let's go to the automatic over here and let's change it to another pattern
for example let's take the blue green over here click okay okay so now we're going to go and add more customizations
to our map for example let's say that I would like to change the color of the borders for those States so I would like
to make it red in order to make it more interesting I cannot do that in the current view because if I change
anything about the Border it going to change the border of the circles and not the border of the states so in order to
do that we need two maps one for the circles and one for the states all right so now let's see how we can do that
we're going to go to the lunch tude and we're going to go and duplicate it so now with that we got two maps the left
and the right let's go and configure the right one so let's switch the marks to the second map and now instead of having
circles we want to have a map so let's switch it to a map so now as you can see now we have two different types of maps
but now I would like to have only the Border information so I'm not interested about the sale so let's go and remove it
and as as well for the sizing and now as you can see we have gray colors that is filling the map so let's go to the
colors and reduce the opacity to 0% so that we don't have any colors on the map what do we need is the color of the
border so let's go again to the Colors Let's go to the borders over here let's make it red I'm not really happy with
this color I want it to be more red so let's go to more colors and let's get the rear Reds and now the question is
how to merge those two maps in one map well the answer for that using the Dual axis again so let's go to the right one
over here right click on it and dual access all right so with that we got one map but I'm still not that happy you can
see that the circles are behind the lines in order to have it in the front let's go and switch those two measures
and now you can see that the circles are in the front all right so with that we have created our night vision map and
with that you have learned as well how many possibilities that you have in tableau order to customize the maps all
those different options that we have inside the maps I really recommend you to go and explore those options that we
have inside table it's really fun okay so now we're going to learn how to create histograms in Tableau there is
two ways one quick way and one Advanced way the quick way if you have one measure the advanced way if you have two
measures the histograms are really great way in order to show the distribution of your data using bar charts so let's see
how we can do that let's work with the one measure the quantity so right click on it and then go to create and then two
bins and here we can go and configure our bins I'm going to leave it as a default as tblo suggest so let's go and
click okay with that we have created a new bin a new dimension in our data pane so now what we're going to do we're
going to go and grab it to the columns and here you can find the size of our pens and then we're going to go and get
the quantity to the rows and then the next and the last step what we're going to do we're going to go to the quantity
and convert it from discrete to continuous so right click on it and switch it to continuous so with that we
have created a very simple and nice histogram to see the distribution of our data using the measure
quantity all right the next one is going to be a little bit more advanced where we're going to create a histogram using
two different measures the number of customers by the number of orders so we want to Cluster our customers based on
the number of orders that they placed so now in order to do that we have to create our pens but now we're going to
use the calculated field in order to do that using the LOD Expressions fixed so let's see how we can do that let's go
and create a new calculated Fields let me just move it a little bit over here so what we're going to find out is the
number of orders per customers so in order to do that we can to use the LOD function fixed so it start with fixed
let me select that and then for each customers we want to C count the number of orders so for customers we're going
to get the customer ID and then the aggregation going to be the number of orders so that means we're going to go
and count the order ID all right so that's it let's go and hit okay so with that Tableau did create a continuous
measure but I would like to convert it to a discrete Dimension so right click on it and let's convert it to Dimension
and that's it so now let's go and grab it to our view and check the informations all right so with that we
can see that we we have already our pens and those are the different number of orders that the customers did order so
the next step we need our second measure it's going to be the number of customers so let's go to the customers count over
here drag and drop it to the rows and as well let's take the customers to the labels and with that we got a very nice
histogramming Tableau using two measures so again here if you want to build histogram from two different measures
one of those measures has to be the basics dep pends of the histogram and the second measure going to be used in
order to do the counts so now we can see very quickly that most of our customers are ordering between 13 orders and like
16 orders all right so those are the two methods on how to create histograms the easy way and the little bit complicated
way okay so now we're going to learn how to create calendar in Tau so now we're going to go and build this calendar
using the order date so let's take the order date first to the column and now in the columns we have to have the days
so right click on it in order to change the format and then go to more and then let's get the weekday so with that we
got the Monday Tuesday and so on then we need to build the rows of the calendar and it's going to be the week number so
let's go and hold control duplicate it to the rows instead of the weekday let's switch the formats again to over here to
the more and then week number so with that we got our Matrix our calendar but as you can see we have here all the
weeks I would like to reduce it to only one month so that means we're going to go and add some filters to our view
let's take the order dates put it on the filters and the first filter going to be on the years so go and select the years
and let's select the last year hit okay and we can of course go and offer it for the users so right click over here and
show the filter on the right side we're going to do the same for the months so let's go and take the order date and put
it in the filters let's go for the month next and let's select only one month and then offer it as well to the users all
right so with that we got a calendar of 1 month let's go and sewitch it from standard to entire view so now as usual
we need a measure in order to fill our calendar it's going to be the sum of sales so drag and drop it and put it on
the colors all right so with that we can see already that we have a heat map inside our calendar now we need to just
add few stuff for example let's add some white border between those informations go to the colors and then go to the B
and add a white color so that we get nice separations between the days and let's add as well the day number in each
box so in order to do that we're going to go to the order dates put it on the labels over here and then here taable
switch it automatically to a text let's go and switch it back to squares and instead of having the years we have to
go and format our date so right click on it and let's go and select the DAT and then the next step let's go and place
those numbers of the days on the top right corner so let's go to the labels alignment and let's go to right and then
top all right so with that we got a really nice calendar in Tableau of course you can go and switch to another
month let's say for example in February or check another year 2021 and that's it this is how you can create calendar in
Tableau all right now we're going to create in Tableau the waterfall charts it's very useful in order to show the
flow of the process of your data and as well to show the anal off part to whole so let's see how we can create that
first we need a dimension like the subcategories let's move it to the columns and then we need a measure this
time let's take the profit drag and drop it to the rows and then let's change it from standard to entire view so now in
order to have a waterfall inside our view we need the running total in order to do that let's go to the profet over
here right click on it and let's do a quick table calculations and let's switch it to running total so with that
you can see we have now a run total of our data but still it is not a waterfall so in order to do that we have to switch
it from the classic bars so let's go to the marks over here to the gun SPS all right so with that we got the basics for
our waterfall but now the size of each line going to depend on the profits so let's go again and grab the profit to
the size but now if you check it closely we can see that those bars are not making the waterfall because they are in
the opposite direction we would like it to be starting from zero from the bottom to top top so in order to make this
effect let's go to the sum of profit over here double click on it and then let's make it as a minus so click on
that and now exactly we got what we want so it start from the bottom to up and with that we are forming the shape of
waterfall so now we have to add some coloring so let's go and get the profit put it on the colors and now what we
want to do with the colors if the numbers are positive then it's going to stay blue but if it's negative it should
be red so in order to do that let's go to the colors and edit colors and now we're going to do the following setup so
let's go over here and make it only two steps and then let's go to advance over here and make sure that everything in
the center so it is zero over here and that's it so let's go and hit okay and with that we can see very easily where
are the negative values in our waterfall and where are the positive values you can of course make it as green and red
so now the last thing that you have to add to our waterfall is the total in order to do that it's really simple
let's go to the analyzes on the main menu and then we go to the totals over here and let's add show raow Grand
totals so by doing that we get our total on the right side and with that we get a perfect waterfall charts in
Tableau now we have the Paro chart it is very famous chart in the statistics and this chart is based on the par principle
where it used the rule of 8020 and the principal says 80% of the outcomes are generated from 20 % of work or efforts
and one way to visual the parto charts we can use two different charts the first one going to be the par chart and
the second going to be the line charts so let's see how we can build that in Tableau first we're going to start with
the dimension subcategory so drag and drop it to the columns and then we need our measure let's check the sales so
drag and drop the sales to the rows and now in order to have the Paro effects we have to S the data descending so first
should comes the data with the highest sales and then we go descending to the right side so what we're going to do
we're going to go to the sales over here and sort it perfect now we have the par charts the next step we want to do is to
build the line charts so in order to do that we're going to go and get the sum of sales and duplicate so hold control
and duplicate this field and with that we got our two charts so since the second chart going to be a line chart
let's go and switch it so I'm going to switch to the sum of s the second one and instead of automatic we're going to
have it as a line and as well I'm going to change a color to Orange perfect as usual we have to go and merge those two
charts together so let's go to the sum of sales right click on it and dual access and here our chart is broken
because the first chart is automatic so let's go to the first one over here and switch it back to pars all right so we
are not there yet because we have to work on the line the line should be the percentage of the running total so in
order to do that in Tableau it's really easy let's go to the sum of sales over here right to click connect it and let's
go and add table calculation all right so now we're going to go and configure our table calculations for the second
measure and as I said here we have to do two things first we have to calculate the running total and then we have to
apply the percentage so in order to do that let's go and change the calculation type to a running total so let's go and
select that and with that as you can see in the background we have a running total but the principle here is based on
the percentage of the running total so we have to go and switch this to a percentage in order to do that we're
going to click over here and say add a second calculation so let's click on that so with that we get a primary and
secondary calculations the first one can be executed as a running total and then on top of that we want to get the
percentage so let's go and switch it from difference from in the secondary to percent off total let's click on that
and that's it for the table calculations let's go and close it and with that we have built our Paro charts but let's
understand what is going on over here so now in order to easily read this I'm going to go to the second one to the
line and let's put the labels on top of it and of course the principle says 8020 that means 20% of those subcategories
should cover the 80% and as you can see we cannot see that in this business so if you check our subcategories in this
example you can see it's not 20% we have around nine subcategories in order to reach the 80% so in this example our
business does not follow this principle it's not 80% of the sales are covered by 20% of the subcategories all right so
this is one method on how to create parto chart in Tableau and this is how you can read
it all right so now we're going to learn another method on how to create paror chart in Tableau this time we're going
to go and use two different measures using only one line so let's see how we can do that now we have the business
question and it's ask us do the 20% of the products makes up 80% of the sales so now let's go and get the answer from
the data in order to do that let's get first our first measure it's going to be the sum of sales drag and drop it to the
rows and now let's go and get our second measure it's going to be the count of products so in order to do that let's
take for example the product name to the columns and table ask us here we have a lot of members so add all members so now
as you can see we have a dimension but we want to count how many products we have inside our data so right click on
it and let's go to the measure and then let's select count distinct so with that we got our two measures one more thing
that we need inside the details in order to do the calculations we need as well the product name to be on the details in
order to use it all right so I'm going to go over here and switch it to entire view so let's go to the first measure
right click on it and let's add table calculation so here again we have the same stuff we're going to switch it to a
running total and then we're going to go and add a secondary calculation the secondary calculation going to be the
percent of total and as well let's specify the dimension so let's go and specify the dimension to the product
name the same as well for the right side it's going to be the product name all right so with that we got everything
ready for the first calculation let's go and close it and now as you can see we have already now the percent of the
running total for the product let's do the same stuff for the sales so right click on the sales and then let's go and
add table calculation let's go to running total specify the dimension going to be the product name and let's
go and add the secondary calculation it's going to be the percent of total and then the same stuff we have to go to
the specific Dimension and specify the product name all right so with that we have prepared everything for the second
calculation let's go and close it now we have to go and switch it back to line since we have it as automatic so table
he decide to go with the shapes so let's go and switch it to line and now with that we are almost there we have the
total of Po of the measures and we have our line but as you can see the line is little bit jittery and that's because we
haven't sort the data yet it's very important for the parto charts that we sort the data like we have done in the
method one so now let's go and sort the product name by their sales in order to do that right click over here and go to
sort and then we're going to sort it by the sales so let's switch it to a field and let's go and select the sales from
the field name over here converted so let's make it as a descending perfect now we got exactly the parator chart
that we need so now we have to check whether it's through that 20% of our products make up 80% of our sales so now
in order to check that quickly and easily in the view we can add the support of the reference lines so let's
go and add some reference lines let's go to the analytics over here let's take here a reference line let's drag and
drop it first to the first value and now what we're going to do instead of having the average let's go and switch it to
constants and now here we're going to check with the 20% so it's going to be 0.2 and now with that we're going to get
a reference line exactly on the 20% of the products let's go and close that so with this as you can see we have a very
nice line indicates exactly the 20% on the product the next step is that we're going to go and add another reference
line for the sales so let's take a reference line drag and drop it exactly on top of the sum of sales and now we're
going to do the same stuff instead of average let's switch it to constants and since we need 80% it's going to be 0a 8
so with that we got exactly the 80% of the sales so perfect now we have our parator chart and we can easily answer
these questions from our data so we can say yes 20% of our products are covering 80% of the sales which is exactly
matching the rule of 80/20 the principle of the Paro all right so this is the two methods on how to create Paro charts in
Tableau and analyze your business is all right now we have the butterfly chart or we call it sometimes the
tornado charts it is great chart in order to analyze two different measures by specific Dimension so for example if
you want to compare the number of customers with the number of orders by the category then the butterfly chart is
your chart so what do you need first the dimension it's going to be as usual the subcategory let's move it to the rows
and then as usual I'm going to move it as entire of view then we need our two measures the first one going to be the
customer count let's move it to the columns then the second one going to be the order count all right so with that
we have our two measures and the subcategory now in order to form the shape of the butterfly we have to have
the dimension exactly in the middle and then on the right side we have one measure and on the left side we can have
another measure so in order to do that we're going to use the placeholder the average of zero so let's have it over
here and let's go and place it exactly in the middle so now with that we have the measure on the left measure on the
right and something empty in the middle and then let's go and configure these charts it's going to be the middle one
the average of zero and let's go and switch it to a text and now the next thing we have to go and get the
dimension to the text over here and with that you can see we got now the spine of the butterfly so let's go and make it
little bit more bold so I'm going to go over here and just make it bold but now we have to have the two Wings right on
the right right and then the left you can see the right side is okay so we have it as a wing let's go and sort the
data by the way but the left wing is not correct yet so in order to do that let's go to the count of customers over here
on the axes let's edit the axe and let's go and reverse the scale so that we get exactly the opposite in the scale let's
go and close it and as you can see now we got it perfect on the left side the wing of the customers and on the right
side we have the orders so now the next step is what we usually do is to add some coloring for example let's take add
the customers over here and drag holding control the count of customers to the colors and as well we can go to the
orders over here and drag and drop the orders by holding control to the colors but but of course we can go and
customize the right side with using different coloring so let's go to the colors over here and change the pattern
maybe to Orange let's hit okay and as well we can go and make the text in the middle little bit more bigger so let's
go to the middle and then let's make it maybe something like like 15 and now we can see those subcategories in the
middle very clearly but since we have it in the middle we don't need it on the left side right so let's go and hide it
right click on it and then let's go and disable show header and as well we can go to the axis over here and as well
disable the headers and of course we can add more formatting in order to remove those grids so right click over here on
the empty space to the format and then we can go to the columns Tab and as well remove the grid line and with that we
got a clean charts represent a butterfly or a tornado depend on how you see it where you can go and compare two
different measures by specific Dimension all right so now in the method two we're going to bring those two Wings
together in order to do that we're going to get exactly the same informations let's go and get the subcategories to
the rows and then as usual switch it to entire view let's go and get our Majors so the first one going to be the
accounts of customers and then the second one going to be the accounts of orders but we have to put it now on top
of each others and since we are using the same type of charts we're going to use the measure names and measure values
so take the order counts and drag and drop it on top of the axis over here in order to generate the measure names and
values all right so we have those informations now we're going to go and take the measure names we don't need it
on the road so drag and drop it to the colors over here and just to make sure that everything stay as bars I'm going
to go from here and switch it from automatic to bar and now the next step we're going to go and sort the data so
click on the axis over here and then sort the data descending both of the values or the wings are on the right s
so now in order to have the effect of left and right we don't have here two axes what we're going to do we're going
to do a very small trick in order to do that let's go to the customers over here double click on it and just go to the
front before the counts and put a minus so let's go and hit enter so with that we get again the effect of the butterfly
where we have the left and the right Wings together but of course what is missing thing here is the spine the
dimension the subcategory so in order to do that we're going to do the same so we're going to go and have the average
of zero as a placeholder we have it now in the right side so let's go switch to it and then we can switch it to a text
since we want to have a text of the subcategory and then the next step we're going to go and get the text so it's
going to come from the subcategory drag and drop it on top of the text and with that we got the values or the spine of
the butterfly so the next step is that we're going to go and merge them together in one charts so what we're
going to do we're going to go and use the Dual axis right click on the average and then here we use the Dual axis but
as you can see those values are not yet in the middle and that's because we haven't synchronized the axis so go to
the aage over here and then let's select synchronize axis and with that we got the spine exactly in the middle but it's
not really clear because it's red so let's go and change those colors so let's go to the average over here double
click on it and let's select complete white so that sets click okay and now the next step as usual we're going to go
and start hiding stuff because all those informations are not necessary so the average over here let's go and hide it
and as well we don't need the header informations because we have it already in the middle so right click over here
and disable show header and with that we get a very elegant and nice butterfly charts in Tableau where both of the
Wings together and now you can go and analyze the coloration between the number of orders and the number of
customers by the category all right so this is how you can create butterfly or tornado charts in Tableau using two
methods all right so now we're going to go and learn how to build quadrant charts in Tableau this type of chart is
going to go and present a lot of data points in one View using two measures and then we go and compare those
different data points based on their position on the quadrants and then we go and split the chart into four different
quadrants this type of charts is really great in order to do strategic planning or to do risk managements or as well to
find some Trends so now let's go and check in Tableau how we can build that so the first thing that we need is two
different measures the first one going to be let's take the discount and put it on the columns and then let's go and
find the average of the discount so right click on it and let's go to the average instead of sum so this is our
first measure now we need another measure and this time going to be the profit ratio we don't have it in our
data so let's go and quickly create it so create a new calculated Fields profit ratio and it's very simple so it's going
to be the sum of profit divided by the sum of sales so that's it let's go and hit okay
and then let's go and bring it to our rows so with that we got our two axis but I would like to have it as
percentage so let's go and change the formats let's go first to the profit ratio and then instead of numbers let's
go and switch it to percentage and then let's go and remove those decimals the same thing let's do it for the average
of discounts so let's go and format it as well to percentage and remove those decimals all right so that's all for the
access what do we need now is the customers as a data points so in order to do that let's go and get the customer
ID and let's put it on the details so now as you can see each of our customers are presented as a data point let's go
and change the visual of that instead of shapes let's have circles and let's let's go and reduce the opacity in order
to see the overlapping between those points and as well we can go and make it a little bit bigger so now we need two
values in order to split this chart into four different quadrants and now here since we have the title as Dynamic we
want to offer it to the users as parameters in order to specify those two values so now let's go and create two
parameters in the data pane so we're going to create the first one let's say select discount so it's going to stay as
float and the display going to be as a percentage let's reduce the decimals and then let's say that the default is going
to be 0.15 so with that we're going to get 15% so that's it for the first one we're going to do exactly the same for
the second one in order to get the profit ratio so let's create another parameter and we're going to call it
select profit ratio we're going to have the same stuff again so we're going to have it as percentage reduce a decimals
and let's have it as a 10% so 0a 1 so that's it for this one let's go and close it and and show it in our view so
show parameter and show parameter now we have it on the right side next we have to create now a separation our view in
order to show how the data are splitted so in order to do that we're going to add two reference lines so let's start
with the profit Rao right click on it and add the reference line and then the value going to depend of course in our
new parameter so select perect Rao and then let's go and make the label empty and then we can go and change the format
instead of having a line let's have it dashed one and then let's have it PL and then increase the oppacity and that's it
let's hit okay and do the same as well for the discount so right click on the discount add the reference line we need
our parameter it's going to be select discounts remove the label and as well do the same stuff on the customizations
so we're going to have it as dashed and as well have it clear on our view all right so now let's go and hit okay all
right so now as you can see we have already our quadrant charts where we we have splitted our data into four
different sections and of course we can go now and change those Splitters using the parameters so let's go to the birit
ratio and change it to 0.2 so with that we move it to 20% now of course what is missing in our
quadrant is the colorings of those points so each section should has its own colors and in order to do that we
have to go and create another calculated field to have those four values so let's go and create one so let's call it
quadrant color so now we have to go and identify the position of each data point inside our quadrants so let me just move
it a little bit over here and in order to do that we can use the FL statements so let's start first identifying the
points on the upper right so all those point on the upper right so how we're going to do it we're going to say if the
profit ratio to the parameter value that is selected from the users so we're going to say select and then the perace
ratio so that means we are checking whether the user on the upper section and now we have to check whether it's on
the left or in the right so we're going to talk about now the discounts and the average discounts as well higher or
equal to the value selected from the parameter so we're going to write select and this counts so now we are targeting
all the customers on the upper right so what can happen if the condition is fulfilled we're going to say upper right
all right so now we're going to go and do the same stuff for for all other three sections so let's go and just copy
it from here and then we're going to say else F and then let's go and paste it let me just make it a little bit bigger
in order to see it so now what we're going to do we're going to go and Target the upper LIF so in order to do that we
have to go and change the discount to smaller so now we are saying if the discount is smaller than the selected
value in the middle so that means we are on the left side so what's going to happen we will just go and flag it with
the following value upper left then we have to do the same stuff for let's say so now we're going to go and Target the
bottom right so let's call it bottom right for the discount part it is not correct so let's move it like this in
order to have the right section and for the ratio in order to be in the bottom this time is going to be smaller so with
that we are at the right side and for the last section in order to Target it we don't have to go and specify it we
will say just simply else because if none of those conditions are fulfilled we will end up by the last one so we're
going to call it bottom left okay so that's all let's go and end our FL statements and the calculation is valid
let's go and hit okay and with that we got our new calculated field let's go and drag and drop it to the colors so
now as you can see we have a dedicated color for each different sections inside our quadrants and of course if the users
goes over here and change the values of the parameters the coloring quy act as well since we have the parameters inside
our calculated field so for example instead of 15 let's have it as 0.25 so now as you can see the reference
lines goes to the right side to the 25% and as well the coloring will be adjusted so that's all this is how you
can create a very nice Dynamic quadrant chart in Tableau now we're going to talk about
the Box blot in Tableau or sometimes we call it box and whisker plots this type of chart going to help you to understand
the data distributions of your data sets so this chart has like a box and two whiskers on the top and on the bottom
and then in the middle we have the median and the edges of the box so with that we will get five different numbers
in how our data is distributed so let's see how we're going to build that in Tableau it's really easy so let's start
as usual with the sales let's drag and drop it to the rows and then we're going to see how the sub and then we're going
to and see how the sub of categories are distributed on those sales so let's take the subcategory to the details first and
then we have to change the visual to circles so let's go to the marks over here and change it to circles so now in
order to have different charts I would like to add the category to the columns over here and then let's go and make it
a little bit bigger to the middle over here and now let's go and reduce those circles a little bit in order to have it
more clear and with that we have the first part of the Box blot where we have circles next we have to get those
numbers or the shape of the box and the whiskers in order to do that we have to add a reference line so let's go to the
sales over here right click on it and add a reference line and here everything is prepared from Tableau if you go to
the box plot over here and that's it let's click okay and that's it actually with that we got a box blot in Tableau
so now if you go and mouse hover on the charts you will get the five different values the upper whisker the lower
whisker the median and so on all right so another the question is how to read the box plots well there are a lot of
informations over here but the first thing that you can do is to compare the position of the median of each box so if
you have a look over here you can see that those two boxes are at the same level right so they are very similar
categories but if you check the office supply that you can see the median or the Box itself it is below those two
other boxes this can indicate for us that the furniture and technology has a same distribution but the office supply
has a different one and another thing that you can check is the size of the Box itself if the box is tall or the
length of the box is long then that means the subcategories inside this category are not really similars and
they are far away from each others but if you check the office supply you can see that the box is shorter so the
length of this box is smaller compared to the other two that's going to give us the information or the hint that the
subcategories of this category the office supplies has like a similar sales so that means if we have a shorter box
the members of this category can to have a similar Behavior but if you have a toll boox that's going to suggest that
the members of those informations going to have different sales but if we have a big or tall box that means the members
of this category going to have different behavior and of course this type of chart going to help us to find the
outliers especially on the upper and on the lower whiskers all right so that that's all about the box plot in
Tableau okay so now we're going to talk about the kpi charts key performance indicator we usually use it in order to
analyze the performance of our business whether it is succeeding or failing all right so now let's go and build a qbi in
order to track the performance of our sales in our business so let's go and do that as usual we're going to go and get
the subcategories to the rows let's take the sales as well to see the numbers and then the next step let's say that we
want to check the sum of sales for each country so let's go and grab the country filled to the columns and then the next
step we have to define the core of the qbi the rule when the S is going to be considered as a success and when it's
going to be considered as fail or maybe in between so what we have to do is now to go and create a new calculated field
in order to define the qbi rule so now let's go and call it qbi colors so now by checking the data let's see that if
the sum of sales is higher than 50k then it's going to be considered as a success or if we are talking about colors it's
going to be green we're going to work with the FL statements so we're going to check whether the sum of sales is higher
than 50,000 then what going to happen we're going to say it's green so now the next
we have to define the second rule let's say that if the sales is between 10K and 50k this going to be medium or let's say
orange so let's go and and build that using else if the sum of sales less or equal 50k and the sum of
sales we are making like a range is higher than 10K let me just make it a little bit bigger then what can happen
it's going to be orange all right then we have the third rule if it's not in between or not higher than 50,000 then
it's going to be less or equal to 10K so what we're going to do at the end we're going to say else it's going to be red
so that's it let's end it so this is our qbi rule in order to track the performance of the sales so let's go and
hit okay and with that we got a dimension here on the left side the kbi colors let's go and grab it and put it
on the colors so now the next step let's go and assign the correct color tblo got it almost correct so let's edit the
colors the Orange is orange red is red but the green is blue so let's go and switch to that and with that we can
immediately track the performance of the sales where we can see immediately where we are performing good so you can see
those green numbers or we are performing bad by the red numbers but if you saw any qbi dashboard you will see that they
are using a lot of shapes so now instead of those numbers let's go and get shapes assigned to those three values so that
means we're going to go to the marks over here and switch it to shapes now things are ugly currently so let's go
and take the sum of sales to the details and then we're going to take the qbi color to define the shape of our visual
so with that we got different shapes for each level of our qpi but I would like to change it so let's go to the shapes
over here and then let's go to the default and then switch it to qbi so now we have better icons for our qbi let's
go and switch stuff so green it's going to be this icon Orange it's going to be this and then the red it going to be the
red one all right so that's it let's go and hit okay and now we can go over here and make it entire View and as well
change the size of our qbi and with that we got nice kbi where we can see immediately where we are doing good and
where we are doing bad so this is how we can create kbi in Tableau all right so now we're going to
learn how to combine a qbi together with any other type of charts like for example the part charts so now we're
going to go and build view in order to compare two years in order to do that we're going to get the same stuff so
let's get the subcategories to the rows and then here we have the sales of 2022 move it to the columns over here so with
that we got our par chart but I would like to move it from automatic to par in order to make everything stable and not
later break in our visualization so the next step I would like to go and add as well the coloring so let's take the sum
of sales 22 and put it in the colors and now the next step let's take the 2021 as a reference inside our view so let's
move it to details and then let's go to the axis right click on it and let's add reference line so here we would like to
have the value of 20 2021 for each category so let's switch it to be cell and then select the 2021 and then let's
go and hide the labels this is only customizations then let's move it to little bit heavier line and then
increase the oppacity and as well change it to Orange so that's it let's go and hit okay so now in order to see the data
better let's switch it from standard to entire View and with that we got a reference from the previous year and the
parts are the current year so with that you can see quickly the differences between the two years but we are not
done yet this is only the bar chart now we have to go and add a qbi for it so here we have to define the rule of the
qbi and this time it's going to be easy if the current year is less than the previous year then it's going to be red
if it is more or equal it's going to be green so let's go and Define this rule as usual we're going to go and create a
new calculated field we can call it kpi colors so now we're going to go and Define the rule we will use as well the
F statement so if the sum of sales of 2021 is higher or equal to the sum of sales of 2021 then we are safe
it's going to be green let me just make it a little bit bigger in order to see everything but if the condition is not
fulfilled what's going to happen we will have bad performance so it's going to be else red and then ends so this is our
rule let's go and hit okay so now for the qpi we need another chart inside this view but since it is like a
dimension if we bring it to the view it will not split into two different visuals so in order to generate another
chart we will use the trick of using the average of zero so we have to create a placeholder average of zero and with
that as you can see we will get a new chart on the right side so in this measure we will go and configure our kbi
let's go and switch to this marks and now we're going to switch it from bars two shapes it's like we are building any
other qbi and I will go and get rid of those informations and now we're going to go and get our new calculated field
the qbi rule and put it on the shapes and next we're going to go and Define the shapes of our qbi so let's click on
shapes and let's say if it's green then it's going to go up and if it's red it's going to go down that's it for the
shapes click okay and as well we want to change the coloring of those stuff so let's take the qbi colors hold control
and put it on the colors and let's go and assign it so edit colors green going to be green and red going to be red so
that's it click okay so now we have our qpi on the right side so we can go and make it a little bit bigger in order to
see the shapes so now we have two different charts The Next Step we're going to go and use the Dual axis and
that's because they have different shapes so let's go to the right side and have the Dual axis and as usual we're
going to go and synchronize the axis and remove one of them let's go to the average as well and then go and disable
show header with that we hide it so with us we got the two qbis on top of each others but still here we have an issue
as you can see the icons of the qbis are exactly on the top of the edge of the bars and that's because everything is
starting from zero and we have here the average of zero so now what we're going to do we're going to move it little bit
to the left sides using the negative values so let's go to the average of Z and switch it from 0 to minus
10K so with that we can see our kpi is perfectly on the left side of the bars and we can see immediately where we are
doing bads so here we can see that almost all of the subcategories are doing great so we have all those green
icons but only two the envelopes and the machines are doing bad and that's because the sales of the current year is
less than the sales of the previous year so with us we have learned how to combine the kbi charts with any other
charts it should not be a bar chart it could be an area or a line charts okay so now we're going to create bands
in Tableau they are those big numbers that you can see usually in qbis or in dashboards where you're going to see the
total of something like the total of sales the totals of profit how many customers do we have inside our data
sets so it's very common and you can see it almost in each dashboard so let's go and create it so what we're going to do
first we have to go and switch our visual from automatic to a text since we are are working with text there is no
charts or any visuals so let's take the sales and put it on the text so now with us we got one number without any charts
only one big number the total sales of our data now we can go and split it by a dimension like a country so let's take
the country put it in the columns so now we can see the total sales of each country so now since we are talking
about pans those numbers should be really big so in order to change that let's go to the text over here click on
those three points and then let's go to the Cs and make it really big so we're going to go to the size over here let's
take for example 22 and make it pulled and then you can check by hitting apply the size of those numbers they looks
good so now let's go and hit okay and let's make the alignment correct so let's have everything centered so on the
horizontal and the vertical so now the next step we can go and change the format of those numbers so let's go to
the sum of sales over here and go to format and then we're going to go to the numbers over here in order to change the
formats let's go for custom so there is no decimal places let's make a zero and then let's say we're going to display
the unit as a thousands as a k and then we can add the dollar sign on the Prix over here so let's go and do that so
that's all about the format let's go and close it from here and now with that we have created really nice pans for our
dashboards we can go and make little bit bigger in order to see those numbers and now you might say you know what I would
like to have those Texs beneath the the number is not on top of it so in order to do that what we're going to do we're
going to take the country again and let's put it to the text and with that we're going to get the text below it but
of course we have to make it really small so let's go to the DX over here then to the three points and then let's
go to the country remove the p and let's move it for example like 12 all right so now let's go and hit apply in order to
check the formats so now as you can see we got those small text beneath those numbers but we can go and as well reduce
it to 10 to make it really small beneath those big numbers so now let's go and hit okay and with that we got really
nice small text below our numbers but we still have an issue where we have the header informations in order to remove
it just go to any values like Germany over here right click on it and disable the show header and with that we got a
really nice pant where the text is below the big numbers so as you can see here we didn't use any type of charts we just
use the text in Tableau now we're going to learn how how to build a funnel chart in Tableau
funnel charts are really great in order to show the progress of your data through different stages so let's see
how we can build that let's take the sales and put it in the rows and now we want to see how the sales are
progressing through the different subcategories so let's take the subcategories from the products and put
it to the colors now the next step we would like to change the size of those blocks based on the sum of sales so in
order to do that let's take the sum of sales by holding control and put it to the size and now let's go and switch it
from standard to entire view in order to see the size of each block and now we need to form the shape of the funnel in
order to do that we're going to go and sell the data descending so the biggest one going to be on top and then we go to
the small so in order to do that let's go to the subcategory over here right click on it and let's go and sort it and
then we have to change the sort by to a fi then move it to descending and that's it as you can see from the background we
have now the shape of the funnel so now the next and as well the important step in the funnel chart we want to show the
percentage of total for each block so in order to do that let's take as well the sum of sales and put it to the text and
with that we got the total sales for each subcategory but we don't want that we want the percent of total in order to
do that right click on it and let's go to Quick table calculations and then let's pick the percent of total great so
now we have those percentages on the funnels which is very nice in the funnel chart
let's go and add as well the text of the subcategory so let's take the subcategory and put it to the labels so
now we can go and customize our view a little bit where we say okay let's put the text of the subcategory on top of
the sales so switch the order and then let's go and change the labels and make the subcategory little bit bigger and
bold so let's hit okay and as well we can go and remove those grid lines so right click over here to the formats
let's go to the lines and then let's go to the zeros over here and make it none all right so that is more clean what we
can do we can add the category to the filter so let's go to the category show it as a filter and with that we can go
and select specific category in order to see the data so with that we get like less blocks inside the funel chart or
you can go and add all of them so that's it this is how you can create funnel chart in Tableau in order to track and
check the progress of your data in our qbi Dash we can add stuff like a progress bar let's see how we can
build that in Tableau so now let's go and get a dimension like the country to the Rose and then we're going to go and
track the progress of our sales as a progress bar so in each progress bar you have like two bars the one in the
background for the 100% And then your actual progress so that means we need two bar charts let's take with the first
one and switch it to bar and as well let's show the text but now instead of the total sales let's go and switch it
to a percent of total so let's go and switch our sales to a quick table calculations to a percent of total all
right so on the next step we want to add the background color so what we're going to do we're going to add our placeholder
average zero so now the next we're going to go and add the background bar so in order to do that let's go and add our
placeholder it's going to be the one aage of one so now we got our background on the right side and on the left side
we're going to get the actual progress let's go and merge them together using the Dual AIS so right click on the right
one and then move it to dual aess okay so as usual we're going to go and synchronize those two axes and let's go
and make it a little bit bigger in order to see the bars so now we can see that the average the background is in the
front in order to switch that let's go to the axis of the average right click on it and then here we can say move
marks to the back all right so now the next step in order to get the effect of the progress bar we have to change the
coloring of the background so let's go to the colors edit and then let's select the average and let's take the blue
let's select something lighter so let's take a light blue apply okay all right so with us we get the effect of the
brers bar let's go and hide few stuff like for example this ax over here and as well let's hide those numbers on the
background so let's go to the labels and hide them all right so that's it this is how you can create a really nice
progress bar in Tableau where you can put it inside your dashboards all right so we learned how to build 63
charts in Tableau and what are their use cases but you might be still like overwhelmed with all those options and
all those charts in Tableau and it's still not that clear how to answer the question how do we know which chart
which visualizations that we have to pick so that's why we're going to go now and summarize and group all those charts
under different categories so we have the change over time magnitude part to whole corations rank ranking
distribution spatial and flow and each of those categories going to focus on a specific question specific problem in
order to answer it using visualizations so now let's go through all those categories one by one in order to
understand them all right so now we're going to start with the first one and the most
basic category we have the change over time or sometimes we call it Trends over time so this category going to show us
the trends or the patterns over a continuous period and and it usually answer the question how does the data
change over time or another one are there any Trends or patterns that we can uncover from the data over time so if
you have this kind of questions then you are talking about the category change over time and the best chart in the
category we have the line charts because the line charts Focus only on one thing the changes over time the trends over
time because mainly the line charts Focus only on the changes over time the trends over time nothing else and as
well visually it makes it really easy to spot Trends and as we learned before we have multiple charts that covers the
topic of change over time of course all the line charts usually are change over time so we have the line chart as the
perfect one then we have as well the spark line charts we can use it if you want to have a comact chart for the
trends analyzes over the time or we can use the slobby charts to see how the ranks is changing over time or as well
we can use a bar charts so we can use the bars as well in order to analyze the changes over our time and as well to go
and compare different time period together and not only the bar charts we can use any type of area charts for
example the sted area charts here we have different use cases one of them is the change over our time and as well to
go and compare different categories together and as well we can go and use the calendar chart or the circle pble
timeline in order to visual the change over time so as you can see if you want to have only one use case inside your
visualization to show the change or the trend over time then go with the line charts if you want to go and cover
multiple use cases in one chart then you can go and use the area chart bar chart or the circle time charts because they
don't focus on only one use case they can cover multiple use cases and one of them is the change over
time all right so now we have the magnitude category or sometimes we call it size category and it uses the size in
order to compare values so we could use relative or absolute values in this category so for example if you have the
following task or question find out the highest and the lowest sales of the categories or we have to go and compare
the different categories by sales in one chart so if you have such questions or task then we are talking about the
category magnitude and the best chart for this question is the power chart because it makes it very easily and
clean in the visualizations in order to compare values you can compare very easily the data by comparing the length
of the bars of each category and under this category we can find multiple charts and most of them are bar charts
so we can use the rowar chart as a main one or we can use a bar chart column as we learned before if you have a
dimension with high cardinality you can go with a row but if you have a chart with low cardinality then go with a
column so those two charts only cover one dimension but if you have multiple dimensions then you can go with the side
by side bars or the Stacked bar charts or as well the full stacked bar charts then we have different charts under this
category like the lulli poop charts Popple charts and the Scutter plots and you might ask why Scutter plot and why
pple chart because the size of the bubble going to be used in this analyzes so we can see immediately that the
technology and the signature has the highest sales from the size of the pule the same thing goes for the Scatter
Plots so here again it's really depend on how many questions you want to cover in one visualizations if it's only one
use case to go and compare the data then go with the row bar chart or the column bar charts but if the size comparison is
not only the use case that you want to cover you want to cover multiple stuff like adding multiple dimensions and
measures then you can go with the other charts under this category all right now we have the
category bar to hole it shows how a hole or a value breaks down into its components and how each component can to
contribute to the hole to the total and it going to show how each component going to contribute to the whole to the
total so if you have a question like how does the value contribute to the total then we are talking about part to whole
category and the best chart to visual the answer is the pie chart because visually it's very easy and as well very
effective to show how each slice of the pi going to contribute to the whole pi and in this category the part to whole
we have different chart types like as we said the main one is the pie chart but we can go and use the donut chart
especially if you want to show the information of the whole the total so you can present it in the middle and
around it you're going to have the slices or we can go and use the par chart for example the full stacked part
chart or the area charts the full stacked area charts and as well you can go to the tree map if you want to
analyze not only the part Toole but as well you want to show the hierarchical data and as well we can go to the
waterfall in order to show part Toole as well the flow of the data so here again if you want to only focus on the part to
whole use case go with the p chart but if you want to add more information and analyze different use cases then you can
go with the others all right now we're going to talk about very important category we have
the correlations it's going to show the relationship between two or more measures in one visualization so this
category going to answer questions like is there any relationship between two measures or how strongly related are are
two variables or two measures so if you have such a questions then we are talking about the category correlation
and the best chart in order to visual the correlation is the scatter plot the scatter plot is very effective in order
to show the relationship between two measures and it covers a lot of use cases like discovering the outliers it's
very flexible we can add a lot of informations to each data point and as well it can help us to build clusters so
if the question to show the relationship between two measures the best chart is to use the Scutter plot and underneath
this category we can find different type of charts not only the scatter plot but scatter plot is the favorite one so we
have the quadrant charts we can use it as well to analyze two measures and as well to Cluster our data or to split it
to four sections or we can go and use the Dual line chart if you want to see as well the changes over time not only
the coloration but you can see the trends as well so we can go and use two lines in order to analyze the coloration
between two measures or we can go and use one line and one bar charts coloration and as well we can go and
compare the side of each bar moving on to another chart which is very beautiful in order to go and compare two measures
we can use the butterfly or tornado charts and the last one you can use as well the histogram in order to find the
coration between two charts and as well to show the distribution of your data so again if you want only to focus on the
correlation nothing else you can go and use the scatter blots but if you want to go and add different use cases like the
change over time or the distribution or comparing the sizes then you can go and use the other ones
moving on we have another category called ranking so we use this category if the most important thing to show is
the position of the item in a sorted list so for example if you want to show the ranking of customers the top 10
customers by the sales or the lowest 10 products by the sales then we can use the ranking category in order to solve
those tasks and the best charts in this category is the bar charts because bar charts are really amazing in order to
build a list and as well to go and compare different ranks together all right so in order to show the ranking we
have different types of charts the basic one as we saw we have the part charts whether it's row or columns and then we
have different charts if you want to add more informations or more use cases in one chart for example the lollipop chart
where you can go and put one extra information inside the circles or you can use the slobby charts so here not
only we are seeing the ranks between countries but we can see how they are changing over time and we have other
charts like the funnel charts or the pump charts as well here we can show their ranks how they are changing over
the time and the last one we can use as well the butterfly in order to show the ranking of the categories for example
here and as well the correlation between two measures so here again as usual if you want to focus only on ranking only
in this you can go and use the par charts but if you want to go and cover multiple use cases in one visual then
you can go and use the other charts all right so now we have the distribution category we can use it in
order to show the values of a data sets and the frequency of their occurrence so if you have the following question like
what is the distribution of customer's age or if the question is what is the busiest time in the workday so if you
have such a type of questions then we are talking about the distribution category and the best chart to visual
those questions and the answers is to use the histogram histograms are amazing way in order to show the patterns using
pens and it's going to make it very easy to understand the distribution of the data under the distribution category we
can find different type of charts Parts the main one going to be the histogram and we can go and use different type of
plots like the box plots in order to see the distribution of data as well for the Dot Plot over the time and as well we
can go and use the scatter blots or the quadrant chart in order to see the distribution of our data and as well to
show the coloration between two measures we can go and use as well the barcode charts for example here we can see the
distribution of each product in each subcategory and as well the perer chart considered to be a distribution chart so
here again if you want only to focus on the distribution then go and use the histogram but if you want to cover
multiple use cases in one view you can go and use the other charts moving on we have the spatial
category use it when the geospatial pattern of your data is the most important thing that you want to show so
if you have questions or tasks that involves informations about the location like country cities states like for
example you want to show which city has the highest sales then we're going to go with this category the spatial category
and of course here the charts that you can use in this type of visualizations is the map and in this course we have
built four different Maps the first one the fied map or we call it corop map so here as you can see the states are
filled with colors or we can go and use symbols like here we are using the star in order to show the sales for each
States and then we have learned how to customize the maps for example here we have created the night vision
map all right so now we're going to talk about the last type of category we have the flow we're going to use it in order
to visual the movements or the flow of our data so if you have a question like how the data is moving from one point to
another point then we are talking about the category of flow and one very common chart in order to show the flow of the
data or the process of the data we can go and use the waterful charts so with this chart you can see the movement of
data or the flow of the process of your data and as well we can analyze here the part to whole all right so with us we
have covered the eight different categories and we mapped different charts that we have learned in this
course to those categories so as you can see the process is really simple in order to understand which chart of
visualizations you need in your projects first you have to understand the questions that should be answered so
once you understood the task or the business question you can go and map it to one of those eight categories and
after that you're going to go and choose the best charts within each category in order to answer the question and with
that you have learned the process of choosing the right visualization the right chart for the question and make
sure to check the description I leave their link for the visualization sheet sheets and as well you will find the
Tableau file where I have sorted all those charts under the eight categories all right so with that we have learned
how to choose the right charts for your requirements and with that we have completed the Tableau chart section and
now in the next section in our plan we're going to learn how to create and design our dashboards in
Tableau Tableau dashboard now we're going to learn the basic principles about how to structure our chart inside
dashboards in Tableau and we're going to focus on the containers in order to structure our dashboard so once we build
all those beautiful charts we can go and group them in one place using Tableau dashboards so let's
go okay so if you create a new dashboard you will get different options on how to customize and design your dashboards so
for example we usually go and start changing the size of our dashboard of this white space so in order to do that
if you go to the size on the left side we have here three different options fix size size automatic and range what I
usually do I go to the fixed size so here we can go and customize the widths and the heights so for example let's go
with the width with 1,200 and for the height with 800 and then beneath that we have a list of all
worksheets that we have inside our dashboards and then here it's really important is the objects that we have in
Tableau so here we have a list of different objects like containers text extensions images planks and so on those
objects you going to use them in order to build up your dashboard Tableau and the very important objects here we have
the containers in Tableau and they are really confusing if you are new to this tool so we will be focusing on how to
work with the containers in order to build the structure of our dashboards so the first question is what are
containers containers in tblo can allow you to group up different Tableau objects together in one place the object
could be anything like worksheets blank text images or even another container so once you have all those different
objects in one place you can do many stuff like for example moving them all together using the container from one
position to another one so let's have a quick example let's take one of those containers let's take the horizontal
container and drop it to the middle and here the first thing to notice is that the coloring in Tableau so as you can
see we have now a dark blue border around this space the blue border can indicate that this is a container and
now we can go and drop anything inside this container it could be a worksheet it could be a text plank anything so
let's go with any sheets for example I have here one prepared one so drag and drop it exactly in the middle of the
container so now you might notice that we don't have anymore the blue color the blue border we have now a gray border so
that means in Tableau currently I'm selecting an object that is not container so now we can go and grab
anything like for example a text let's take this object and drag and drop it on top of these charts and here let's write
anything like the sales dashboards and just make it a little bit bigger so hit okay so now with this you can see we
have another object that is contain only a text and as well it has a gray border so that means we have one object with
gray border and another one with gray border so now the question is how to select the container that has those two
objects there are many ways in order to do that so for example let's say we are selecting the text if you go over here
to those two lines and double click on it so once we do that as you can see now we have again this blue border that
means we are now selecting the whole container so this means by double clicking on this small icon over here
you are going back to the container that's grouping up those objects and there is another way in order to select
the container so now let's go again inside it and only click on the sheets over here so again we have this gray
border so now if you go to this small Arrow over here we're going to get more options and then here we have the option
of Select container vertical container so once we do that we will go back again to the containers where we have those
objects inside it so this is another way on how to select the current container all right so now you might ask you know
what why we are selecting the container ER well for the following reason for example if you are just selecting this
chart you can go over here and you will get different options about the worksheets so for example you can show
the titles the filters the highlights and you can configure only this worksheets so those options are only
related to this object but now if you want to go and configure the whole container you have to go to The
Container so for example let's go and double click on that and if you go to the options over here we will get
completely different list of options and anything that you are selecting here is going to be reflected for all objects
inside this container so for example in the current container table going to show us there is still space left inside
this container in order to fill it so the whole Space over here is not used which is not really good and as you can
see we have the text objects is way smaller than the worksheet object which is now fine but what you can do in
Tableau is that you can go and split everything evenly so if you go to the containers options you can see over here
distribute contents evenly so if you select that what going to happen as you can see table going to go and
automatically split the size of the container evenly for all objects this is really helpful if you have different
charts in one container so table going to go and split the space evenly for all objects so as you can see the options of
the containers can affect all the objects inside the containers and one more thing to notice
in TBL that table going to create a sneaky container always on the right sides this container is one where table
can to put all the filters Legends highlighters and as well parameters always on top of each others on the
right sides so for example in the subcategories we have the filter of the order date and immediately table going
to create a special container on the right Sid and going to place the filter inside it so for example if you take any
other charts that contains those informations let's take this one over here and put it in the bottom you will
see Tableau immediately going to go and add the filters inside this worksheets beneath the first one so here we have
the filter of the categories that comes from this charts and if we take the next one the customer distributions as you
can see we will get a lot of filters in Tableau on the right side and as well the Legends so here we have the profit
side here we have the country colors and so on so all parameters all legends all filters going to be packed on the right
sides and of course if you want to customize the container that TBL creates on the right side you can go to any
objects and then double click on it and then you can go and customize it so for example I can go over here and split
everything evenly all right moving on about the containers in Tableau we have two different types
the horizontal container and the vertical container let's start with the first one the horizontal container if
you use this type what's going to happen all objects inside your horizontal container going to be side by side next
to each others so let's try that let's take the horizontal container drag and drop it to our dashboards and then let's
take one sheet for example the subcategory over here and then let's take another one so once you can select
it as you can see TBL going to offer you either to put it to the left or to the right so for example let's go and drop
it to the right and with that we got two charts side by side near to each others using the horizontal container and of
course if we go and add anything it's going to be as well either to the left or to the right or in the middle so once
you drop it you will get it as well side by side so this is how the horizontal containers Works in Tableau okay the
next St we have the vertical container what going to happen here all objects inside this container going to be on top
of each others like the are stacked so let's have a quick example let's take the vertical container drop it to the
dashboard and then let's take any charts and as well drop it over here and now once we select another one we can put it
for example below it and the third one either Below in the middle or in the top so let's drop it in the top so as you
can see the vertical containers we are putting those objects or those charts on top of each others so with that we are
stacking the objects on top of each others and this is how the vertical containers works one more thing about
the type of containers which is very confusing if you are starter in Tableau that you can decide on the type of
container as you are dropping the second object so let me show you what I mean let's say for example the horizontal
container drag and drop it to our dashboards so now we can go and drop different sheets next to each other's
right so let's take the first one as usual let's put it over here and now we come to the second sheet and our
expectation that we can put it either to the left or to the right because we have horizontal container well the second
sheet or the second object is a special one you can use it in order to change the type of the container so let's take
for example this one over here you can see we can put it left we can put it right but as well we can put it on the
top or on the bottom so once I drop it to the bottom what going to happen TBL going to go and convert the type of this
container to a vertical container so now we cannot go and change our mind it's going to be fixed this going to be a
vertical container so for example if I take the third one I cannot change my mind by putting it to the left or to the
right I can put it only to the top or to the bottom so it can stay as a vertical and the third one will not change the
container type so here I can drop it for example in the bottom on the second sheets we still have the option to
change our M to make it either horizontal or vertical container depends on how you are droing the sheets but
after that for the third sheets you don't have any more of those options you can drop it only depends on the
container type all right so now the more thing that we put inside our container the
things gets more complicated in order to control control the structure of our dashboards so there will be a lot of
nested containers in top of each others and you will lose control with the time if you are building a complex container
and for that Tableau did provide a view of the current structure of our dashboard so now we are currently at the
dashboards in order to go to the view let's go to the layout so let's switch that and then here at the bottom we have
something called item hierarchy so here we will see the structure of our dashboard so it starts with the Tilt so
if you click on that you can see table going to go immediately and select the current objects so here we will see the
structure of our dashboard and it starts with til since we are using this methods so if you click on that TBL going to go
and select the current object in the hierarchy so this is the highest container where we have everything in
our dashboard inside it so let's go and expand our hierarch key so you can see that it then splits into horizontal
container and as you can see it clearly we have one container for all those filters Legends and so on and on the
left side we have a container for all our worksheet and you can see that by just like moving this slider over here
so as you can see the first object is a horizontal container and then inside the horizontal container we have two
vertical containers so the first one going to be this container for the chart and as you can see things are stacked up
on top of each other so this is our first vertical container and if you click on the second one now we are
selecting the container on the right side and it's as well a vertical container as you can see all those
filters and stuff on top of each others and then of course we can go and expand those containers to see the content so
as you can see we have here Three Sheets inside the first container and in the second one we have three filters and
then we have those two legends so having this item hierarchy going to help us with a lot of stuff so for example it's
going to help us to understand the structure of our containers how things are nested to each others and another
use as well to understand whether we have made any errors by building the containers so as you are dropping stuff
inside your dashboards weird stuff might happen in Tableau where you are creating way more containers than you need and it
can to help us as well to select stuff for example if I would like to select the horizontal container it's going to
be a little bit hard here by double clicking on those different objects it's going to be easier if I go over here
into the item hierarchy and just click on the horizontal container so as you can see it's really easy to go and
select stuff inside the item hierarchy and as well here we can go and have options for example let's go to the
subcategories over here right click on it and with that we will get all the options of the worksheets or if you go
to the containers you will get the containers option so the item hierarchy are really important in order to
structure our dashboards all right moving on we're going to go and learn how to drop objects inside a
container and now just to make things easier I just went through all the worksheets I removed all the filters
Legends and so on just to keep things simple so for example let's go and start with the horizontal container drag and
drop it to the worksheet so now let's take an object like the sheet and drag it to the view table going to show you
different visuals to indicate what can happen if you drop it so for now everything is gray and we have a clear
board order of the container that means now we are dropping the objects inside the container so once I release it over
here what going to happen if we go to the layout you can see the horizontal container contains the worksheets so
that means with this action we place the object inside the container let's check another options let's go to the
dashboard over here and take another sheets so now if you drag it and as you are moving your mouse you will find
different shapes and different stuff so for example if you move your mouse a little bit to the left you can see that
the gray line is on the left side and the contain container the blue container is marked this going to mean if you drop
it tblo going to add it inside the container to the left side if you move it to the right going to happen the same
stuff but to the right side so as long as Tableau is highlighting the dark blue color for the Border it means we are
dropping the objects inside the container but now check this if you keep moving your mouse to the right Sid you
will see that table going to change the color from dark blue to a light blue that means now we are dropping the
objects outside the container so let's go and do that I'm just going to drop it to the right side and now let's go to
the layout in order to understand what happens as you can see the first sheet is inside the horizontal container but
the second sheet is completely outside of the container so if you just minimize it over here you can see that it's not
inside the horizontal container so that means you have to be really careful how you are dropping the objects inside
dashboards table going to react differently depend on the shapes so now let's go and drag a third one let's take
the customer distribution so now as we are dragging so here you can see that Tableau is highlighting the container
because the mouse is inside the container so here we can drop it either to left right bottom on up but if I move
my mouse completely outside T going drop it outside of the container so for example I can put it to the left to the
right to the bottom but all of those stuffs are not inside the container so now let's go back to our container I
will drop it to the bottom so let's go and do that and of course to check what happened we're going to go to the layout
in order to check the item hierarchy so now as you can see Tableau Chang it from horizontal to Vertical container because
we have dropped it below and you can see that this object this sheet is inside the container all right so that's it be
careful how you are drag and dropping stuff inside Tableau dashboards okay moving on to the next
one in tblo we have two different options on how to arrange our objects inside the dashboards and we have the
tiles and floating as a default table going to use tiled option for all our objects but you can go and switch it to
floating so what those objects means let's start with the first one the tiled option if you use this tiles tblo going
to go and automatically arrange your object as a grid layout so that means for example if you go and resize the
dashboard TBL going to go and automatically change the size of all objects inside the containers and
dashboards so let's take an example now we are selecting the til and if you take anything like the sheet over here and
place it inside our dashboards TBL going to go and automatically use the whole Space so this means the worksheets going
to take the sze of the dashboards because table going to say okay we have a lot of spaces is let's go and use
everything but the other option we have the floating in the other hand here if you select it here you have the freedom
the flexibility on how to customize the objects and another advantage of the floating ad that we can go and do
overlapping between the different objects but the disadvantage of the floating of that it's time consuming and
you have to do everything manually so now let's check how this works make sure to select the floating let's take
another sheet and just drop it wherever you want so as you can see we have now gray box indicate the place where we are
putting the charts so let's drop it over here and now we have the full control where to position this object so for
example let's go to this icon over here and just drop it on top of the old one so as you can see we are now just
overlapping or we can change the size as we want so I just can make it like this so as you can see we are having the full
control of this chart of this object without any limitations so now the question is should I use floating or
tilt well in table project you're going to end up using both of them and we normally use floating for the big
containers inside the dashboard layout and the Tilt for all objects that we have inside those big containers all
right so those are the main options on how to work with the containers in dblo but of course the best way to understand
the containers in Tableau is that to have a real project and that's why as a next we're going to have a many projects
in order to understand how to design and build the layout of our dashboards using the
containers all right so now the task or the project is to create a dashboard for the sales and one of the first steps
steps that we usually do in order to plan our dashboard is to create first a sketch so here we're going to go and
draw a very simple sketch for the sales dashboards where first for example we have the title of the dashboards like
the sales performance and then beneath it we're can to have three big numbers or three pants so we have the total
sales the total profits and the total quantity and then beneath that we're going to have three different charts the
first one on the left one we're going to have a bar chart in order to show ranking or the top sales by Cate
and then on the right side we're going to have two charts the first one going to be line chart where we're going to go
and compare the sales with the performance and below that we're going to show the sales by category using a
pie charts so with that we have a sketch we have a plan on how to visual our informations inside the dashboard now in
the next step we have to go and plan the structure of our dashboards in Tableau using containers so if we're going to go
and translate this sketch to Containers we going to have one big vertical container that has three objects on top
of each others we have the title then the Pand and then the charts and since they are on top of each others we're
going to use the vertical container so now we're going to go in more details in each information so let's start with the
first one we have the text in the text we don't have any other informations like beneath it or side by side that's
why we will not use any container here and then moving on to the next information to the bans as you can see
they are side by side that means we can go here and use the horizontal container so that means the horizontal container
is inside the vertical container okay moving on to the next one we have the charts and here it's going to be a
little bit tricky so first if you check the sketch we have like charts side by side left and right that means we're
going to go and use the horizontal container so again here this horizontal container going to be inside the big
vertical container and now if you check the right side you can see that on the right side we have two charts on top of
each others so that means on the right sides we can go and use the vertical container in order to cover those two
charts so this vertical container going to be inside the horizontal container and both of them going to be inside one
big vertical container so as you can see everything makes sense if you are organized and you start sketching and
planning your dashboards so now we have a plant enough let's go to Tableau and start creating this structure all right
so now we're going to start from the scratch we have one empty dashboard and now let's go and follow our plan where
first we're going to have the main container the vertical container so let's take it from objects the vertical
container drag and drop it to the dashboards and now as you can see if you don't select anything it's going to be
still a white page in order to have an identifier for this container and make it easier to see during the design what
I'm going to do we're going to go to the layout over here so select the container and then we're going to have a border
for it so let's go to the Border over here make it a line and then let's make it a little bit heavy and give it the
color of orange so now if I deselect you will see that we have one big container the orange one and this can indicate for
me this is a vertical container and as well what we can do we can go to the item hierarchy over here and give it a
name so let's go and give it a name so now let's call it the main vertical container all right so what do we have
inside this container three informations the first one going to be a text so the title of the dashboard so let's go to
the dashboard over here and grab our text objects and drop it inside this container let's call it sales
performance and big get little bit big so let's make it 2022 bold okay so that is the first airation the second
information do we're going to go and add a horizontal container for the different bands so let's go to the objects over
here and grab the horizontal container and just put it beneath the text so now with that we got a horizontal container
and let's go and make an identifier for that so let's go to the layout make a border and now we're going to give it
the color of blue so now we can see that we have a blue container inside the orange container and we can go and give
it a name so let's go to the hierarchy and let's give it the name of pans and now what we're going to do we're going
to go and add planks inside this container in order to have a placeholder for the actual pans so in our our plan
we're going to have three pans what we're going to do we going to go to the dashboard let's go and add three planks
and as you can see now we have it very small since it's plank let's make it a little bit bigger and let's go and add
the second one to the right side and another one to the right side so now what we're going to do we're going to go
to the layout and go and check the structure over here so as you can see everything is fine those planks are
inside the horizontal container all right so that's all for the container for the pans now next information we're
going to have the charts so again here we're going to go and add as our plan horizontal container beneath this one
over here and as usual we can go to the layout and give it a color and as well a border so now as you can see we have one
container beneath another container and both of them are horizontal container so let's go and give it a name we're going
to call it charts and now we're going to go and add the planks the placeholders for the charts so what we're going to do
we're going to grab a plank over here it's goes again small let's SM it bigger the second one to the right side and
with that we got the left and right so now as usual we go back to the layout and check whether everything is fine so
you can see those two planks are beneath the horizontal container and now as you can see I'm always going back to the
hierarchy in order to check whether everything is fine and here is exactly my tip for you is always to check and
don't leave it until the end so don't check the item hierarchy at the end after you dropped everything in the
charts I promise you will see stuff here that you didn't plan so always as you are dropping new stuff to the dashboard
go and check the item hierarchy whether everything is fine all right so now only on the right side over here we're going
to have two charts on top of each others so that means we going to have a vertical container only on the right
side so let's go to the dashboard over here and now I'm going to go and remove the right plank because instead of that
we're going to have the vertical container so let's click on this plank over here and drop it and then let's go
and get our vertical container and just put it to the right side so make sure it's placed on the right side and we're
still inside the container of the horizontal container so let's drop it and now you can see we have something on
the right and something on the left so let's make it little bit bigger to the middle over here let's go back to the
layout and check everything is fine so as you can see we have the horizontal container this main one and then inside
it on the left its Plank and on the right we have the vertical container so let's go to the right side and give it a
color so it's going to be border and this time going to be orange and inside this container we're going to have two
charts so I'm going to go with the planks again and put it here inside underneath each
others and now let's go back to the layout and as you can see we have those two planks for the charts on the right
side and one big blank for the left one so now the next what we're going to do we're going to go and make sure that
everything is distributed evenly so let's start with the container on the right side over here right click on it
and let's click on distribute contents evenly and then let's go to the next one to the horizontal container for the
charts right click on it and distribute the content evenly and then we're going to go to the next one right click on it
and distribute things as well evenly and now for the last one for the main container I will not do that because
things here has different sizing so the text going to be smaller than the pounds and the charts going to take the most of
the space all right so with that as you can see we have built the basics for our dashboards and we have implemented our
plan so now the last step we're going to go and bring the content inside our containers so let's go to the dashboards
over here so let's start with the pans so let's take the pan sales then the profits and the quantity and what we're
going to do we're going to go and remove those planks since we don't need them anymore and now things here don't look
really nice because here we have titles so let's go and remove the titles from each one of
them and as well we would like to have everything in the center in order to do that click on the objects and go instead
of Standards to entire view or for example if you go over here to those more options fit and then entire View
and for the quantity we're going to go and switch it to entire view so with that we have our three pans as planned
the next thing we're going to have the par charts on the left side in order to show some ranking so let's go and grab
our par charts and what we're going to do we're going to go and remove the placeholder the plank and then the next
step we're going to go and add the last two charts so first we have the line charts going to be sales versus profits
over here and as well I'm going to go and remove the plank and the last one is going to be the pie charts so sales P
category so let's drop it over here and remove its plank so now the next step we're going to go and make sure that
everything has entire view same for the pie all right so as you can see as we have a solid structure everything else
going to be easy we are just drag and drop stuff and removing the planks so now with that we have everything let's
go and remove those borders so let's go to the layout and go to the first one let's remove the border to the
horizontal as we remove this and all our containers removed all right so with that we have our dashboards and of
course we can go and add a lot of designs and a lot of customizations for example we can add a border for all
those pants so let's go and do it just quickly so we can add a gray border for each one of them in order to separate
them and with that we have build a very organized and simple dashboards in Tau using the power of containers so as you
can see it's very easy Once you organize your stuff and do it step by step instead of rushing things and dropping
your charts immediately to the dashboard without any plan it's going to be really hard to control and as well the look and
feeling of your dashboards going to be really bad especially if you want to add more elements with the time it's going
to be really hard to extend your dashboard slow down make a plan and then implement it using the containers in
Tableau and at the end bring your content all right so that's all about dashboards in Tableau all right so with
us we have a solid foundations about the Tableau dashboards in the next section we're going to do a real Tableau
projects where you're going to learn how to execute Tableau project step by step Tableau projects now we can work
together in order to implement Tableau project but what's special about this project is that you will not only learn
how to work with dblo but also you will learn how I usual Implement projects in big companies I'm currently leading big
data and business intelligence projects in mercedesbenz so that means I'm sharing with you now a knowledge and
real life skills on how we Implement stuff in real projects it's not just another online course so I'm going to
take you in the project from the starting point the user requirements and we're going to end up by having a
wonderful Tableau dashboard so the first step we're going to go and analyze the user requirements we're going to design
and draw a dashboard mockups and then the first step in the implementations we're going to prepare our data source
and after that we're going to start building the different charts and once we have all the charts we're going to
start planning our dashboard containers and we're going to start building and designing the dashboard so let's start
first by understanding The Phases the steps of any Tableau project so now let's
go Tableau projects are like any other projects for example building a house the first thing to does we have to sit
with the users and understand than their requirements and their wishes so that means we have to analyze the user
requirements and then before starting constructing the house the architect can go and create a blueprint and the layout
by defining the structure of the house and the rooms and then after everything is planned the foundations of the house
going to be created and this is very crucial step in the construction and now once the foundation is finally stable
the construction going to be starting by building the floors walls roofs and so on and the last phase it is the
finishing touches by adding doors adding electricity choosing the paint colors and the decorations so the project faces
of building a house is very similar to a tblo project and here I'm going to show you now the different faces that I have
usually in each tblo projects so the first phas of each tblo project we're going to start with collecting and
analyzing the requirements so here first we have to understand the user requirements then we have to go and
decide on which chart types we're going to use for each requirement and then together with the users we're going to
go and draw the first Mo up of our dashboards and as well decide on the colors then after we have understood the
requirements we can go and start building stuff in Tableau and we start with the first step by preparing the
data source and here we have the following steps first we have to connect our data then we have to build a data
model and then the last step of that we're going to go and understand the data model and the data inside our data
source then once we have a solid data source we can start building our charts and here we have different steps first
we have to check whether we have all the data inside the dat Source or we have to create a new calculated fields and then
once we create those calculated fields we have to go and test them first before we start building any charts and then
after that once we have all the data that we need we can start building the charts and then once we have the basic
charts we're going to go and start formatting it by adding colors removing grids editing the axis and the headers
and now once we are building all our charts using the worksheets we're going to go to the last phase where we can
start building our dashboards and now for this phase you have to slow down and start planning everything step by step
and rushing in this phase will not help you at all so first we start planning the whole structure of the dashboard by
planning the containers and once we have a plan then we go to the next step where we start building the foundations we
start building the containers of the dashboard and once we have a solid structure we're going to go and start
adding the content to the dashboard and after that we're going to have the step where we're going to take care of the
filters and the interactivity inside our dashboard and then the last step of building a dashboard we going to have
the Final Touch by adding icons like icons for the logo icons for the filters or for navigating between dashboards all
right so those are the main faces of building a dashboard in Tableau and of course my recommendations to take it
step by step and don't thrush things otherwise you're going to end up buy chaos and it's going to be as well
really hard to maintain the dashboard later so don't rush building the dashboards always take time in analyzing
the requirements understanding the data planning the structure planning the Mups and by that I promise you you're going
to deliver a professional work all right so now we're going to start with the tablet project from the scratch where
I'm going to show you step by step how I usually Implement projects using Tableau and we start right
now all right so the first step in each project that we do is that we're going to go and sit with the users in order to
understand their requirements their wishes and we usually decend the requirement in something called user
story so now we're going to go through these requirements I'm going to leave the link in the description and then
we're going to go and start choosing the right charts for each requirement so the user story or the project is about sales
performance and here in the introduction it says we have to go and build two different dashboards using Tableau to
help the managers the stack holders in order to analyze the sales performance and as well the customers so this means
we're going to go and build two dashboards inside Tableau so let's start with the first one the sales dashboard
the main purpose of this dashboard is to provide an overview of the sales metrics and Trends and here it says in order to
analyze year-over-year sales performance so that means here we are comparing two years together let's check the key
requirements in these dashboards so the first one is that to provide an overview for the qpi where we have to display a
summary of total sales profit and quantity for the current year and compare to the previous year so this
means in the dashboard we don't have to present all the sales we have to present only the sales of the current year and
as well the previous years and now let's go and decide which type of charts that we have to present for these
requirements we can go with the Bans Bans are very useful in order to show the main metrics like the total sale
profit quantity and big numbers so for this requirement we're going to go and create bans for it let's go to the next
one we have the sales Trends here we have to present the data of each qbi that means the total sales profit
quantity on a monthly basis so here we are talking about change over time right for both the current year and compared
to the previous year and as well here they want us to identify the months with the highest and the lowest sales so that
means we have now to choose a chart that presents change over time and for this you can of course discuss it with the
users and show them different types of charts as we learned before so for now I'm going to go with the line charts and
precisely we're going to go and use the spark line charts in order to highlight the Max and Min values all right moving
on to the third requirements we have the product subcategory comparison so here we have to compare the sales of
different subcategories for the current year and as well the previous year and it says as well we have to include in
the the compersion as well the profits so here we are comparing multiple stuff first the subcategories with each others
we have two measures the sales of the current year the previous year and as well the profits so here we can
understand that we are comparing the members of the subcategories and for thus we can use the bar charts and since
we have two values the current year and the previous year we can use for example bar in bar charts and then for the
second point in order to compare the sales with the profit we can present as well another bar chart side by side to
the sales in order to show The Profit informations all right so moving on to the last one we have the weekly trends
for sales and profits so here the requirement sales we have to present the weekly sales and profit data for the
current year so here we are talking about change over time because we have the time aspects and we have to display
as well the average weekly values we have to highlight the weeks that are above and below the average in order to
understand the trends in our charts so here again we are talking about change over time but on the we weekly basis we
have it before as a monthly so here we can go as well with the line chart in order to compare the sales and profits
all right so with that we have covered the main requirements of the sales dashboards and as well we have a plan on
which charts to be used for which requirements all right so now we're going to move to another type of
requirements we have the interactivity requirements so here it says that the dashboard should allow the users to
check the historical data by allowing them to select any desired year and not limited to just the current year or to
to the last year so that means the dashboard should be dynamic where the users select the year that they want to
compare it with the previous year so it should not be always the last current year and for that we can use parameters
in order to solve this task then we have the second requirement it says that we have to provide the users the ability to
navigate through the dashboard very easily and for that we usually otom inside our dashboards in order to switch
back and forth between the dashboards and the next requirement about interactivity is that the user should be
able to filter the data using the ch s and for that we can to use dashboard filters and now moving on to the last
one it's about data filters so we should allow the users to filter the data by product informations like category and
subcategory and as well by the location like region state and city so that means we have to provide all those filters
inside our dashboard as well all right guys so with that we have covered the first two steps inside our project where
we understood the user requirements and as well we have decided and choos the right charts for each requirement let's
move to the third step where we're going to build a MOAB for our dashboard all right so this is how I
usually draw a MOAB for a dashboard in Tableau so as usual it starts with the title so it's going to be sales
dashboard and we can put as well in the title which year is currently selected so it's going to be for example the
current year 2023 and now below that we can to have our pans right so we can to have three sections or three pans for
the total sales total profit and total quantity and now in each of those blocks we're going to show The Following
informations first we have to show of course the total so we're going to show the total sales as a big number and then
below it we're going to show the difference in percentage to the previous year and since we are talking about qpi
we have always to show a symbol in order to show the performance of the current year so it's going to be either up or
down so with that we have covered the first requirement the second requirement is to present the data on monthly bases
and compare the current year with the previous year and for that we're going to use the spark line in order to show
the curves and as well the progress of each line so we're going to have two lines one for the previous year and one
for the current year and we're going to show the Max and the minan values using like a circle that we can position it on
the lines so with that we have covered as well the second requirements and we're going to do the same stuff for
each qbi so we're going to do the same stuff for the profit and as well for the quantity all right moving on to the
third requirements we have to present the subcategories comparison so we're going to go and use the bar in bar
charts in order to compare the current with the previous year so for that we're going to have the background bar in
order to present the previous year and the current year going to be the one in the front and what is missing here is
the profit so we can present the profit side by side to the sales to the right side and as well using the part chart
and the profit could be plus or minus and the next info that we're going to present in this chart is the profit side
by side by the sales and as well it's going to be a bar charts where it's going to have plus and minus values all
right moving on to the last requirements we're going to have the weekly trends for sales and profits and here as well
we can use the line chart since it's change over time and we can have two sections one for the sales and one for
the profits we will not bring them together in one because we want to show the average line for each metric so that
means we're going to have a reference line in order to show the average for the sales and as well another one for
the profits and then we have to go and highlight using the colors the data that is above the line and below the average
line all right so with that we have covered all the charts inside our mup of course we have to add different stuff
like a filter so since we have a lot of filters and there will be no space inside our dashboard I'm sure about that
we're going to go and have an icon in order to show and hide the filters so that means we're going to have a
dedicated section where we can put all our parameters and filters like the product filters and the location filters
and the users can go and hit the btom in order to show or hide this section and now we come to very interesting part of
the design of our dashboard at dos we have to decide on the coloring and it's very important to decide de on the
coloring at the start of the project so that you don't have to adjust a lot of stuff later so you have to decide on the
coloring as you are creating the workups together with the users so what I usually do I use maximum of four colors
inside the dashboards so the first two colors are the basic colors and they really depend on the background color of
Tableau if you are using the white color as a background inside the dashboard then I usually go with a very dark gray
and a light gray so those two colors are the basics that I usually use in each dashboard that that I creat and the
other two colors really depends on the user preferences you can let the users to decide on those two colors or you can
take it as well from the icon of their logo so as you can see in the mockup we are not designing only the chart types
and the position of the charts inside the dashboard but also the coloring of the dashboards so now here the final tou
that we can add to our Moab do we can add a logo for the dashboards and as well we can add that Dynamic where we
can switch to another dashboard by using p so here as the requirement says we have two dashboards we have the sales
dashboards and the customer dashboards and we can introduce on the header of the dashboard two buttons in order to
switch between those two dashboards so if the users clicks on the customers it's going to switch to the customer
dashboards but if the users clicks again on the sales it's going to switch back to the sales dashboards all right we
will not design now the customer dashboard I'm going to leave it for you in order to practice we are focusing
only on the first part of the requirements of the sales dashboards all right guys so now we have mockup we have
a blueprint and if the users agrees On These Blueprints we can go and execute our plan and we can start building that
in Tableau and we will start by preparing the Tableau Data Source all right so so far we have
understood the requirements and as well we have a mockup for our dashboard The Next Step it does we're going to go to
Tableau and start building stuff all right guys so the first step is to prepare our data source and I promise
you to start from the scratch that's why we're going to start our Tableau public as an empty where we don't have anything
inside it so now the first thing is of course we need our data go to the link in the description and download the data
that I live there for the project then we're going to go and connect it so in order to do that we're going to go to
the left side over here so make sure you are at the homepage or the starting page of Tableau so let's go to the text file
and then here previously we worked with the big and small data source now we're going to work with the tblo project
sales dashboard so let's go inside it and here we get files which has similar informations as the old data sources so
let's go and select something over here and click open so now we are at the data source page and as you can see we have
connected now our data to Tableau all right so the next step is that we're going to go and create our data model
inside the data source so here we have to go and understand our data I'm just going to go and remove this from here in
order to have everything from scratch so we have to understand our data inside those files in order to know what is
dimension and what is fact so let's go for the customers over here and click view data and as you can see here we
have only two columns customer ID customer name this is the dimension it doesn't have any facts so that means the
customer table is a dimension let's go and close it and go to the next one we have the locations let's go inside and
check the data as you can see we have City Country region states and so on those informations are Dimension
informations as well because we don't have any events inside it so it's not really effect let's go and close it
let's check the third one the orders so now we can see over here we have some IDs like the customer ID order ID
product ID then we have some dates like for example here the order dates we have the ship dates and as well some numbers
like the sales quantity profit and so on so this is an indicator that this table is a fact because we have a lot of
measures and as well we have dates which can indicate that this table contains events so once you see such a setup
where you have IDs dates and measures this is a big indicator that this table is a fact so the orders are facts let's
go to the last one to the products so we can see that we have the product ID category product name and so want those
informations are a dimension so that means this table the product is a dimension table all right so with that
we have now an overview of our data and we can start moding in Tableau Data Source the first thing that we can start
is by drag and dropping the facts so that means we're going to go and get the orders and put it in the data model over
here and then after that we start bringing all other dimensions to the data model so let's take the customers
for example just drag drop it over here as a relation and now as you can see T going to create a relation it's very
important to check the relationship so as you can see we have the customer ID equals to the customer ID which is
correct we will leave all other options over here in the performance as a default since we don't deal now with the
performance first we have to build stuff and then check whether the performance is bad or good so at the start leave
everything as a default let's go to the next one get the location drag and drop it as well over here and we're going to
check as well the relationship it's going to be the postal code equal to the poster code as a key and the last one
we're going to get the last dimension of the product and drop it to the data model and as well we can check the
relationship so as you can see we have the product ID equal to the product ID all right so with us we have our data
model where we have one fact and all the dimensions are connected to this fact and now the next with that I'm going to
go and start changing the names around so for example let's go and rename our data source to sales data source and
then we're going to go to the table names and remove the CSV so right click on it and let's rename so let's remove
the extensions and as well for everything just to have it nice in the data model so with that we have
very nice naming and the tables all right so this is about the renaming the next step is that we're going to go and
check the data types for the fields whether they are correct or not sometimes if you have bad data quality
from the sources you will get strange data types which can to make later a lot of issues if you don't check the data
quality at the start so let's do it quickly we're going to go to the product and as you can see everything here we
have like characters and the data type is a string so everything is fine to the products let's go to the locations and
now we can see that all those informations are geographical informations and as you can see all the
data types are correct beside the region over here so we can go and switch it to a region so let's click on that and go
to geographical rle and here we have the type of country region let's go and select that and we can see that all of
the contain characters and they are the data type of string so everything is fine as well in the customers let's go
to the orders and here we have a lot of fields what is very important to focus here on the date fields so as you can
see the order date and the shipping date both of of them has the data type date which is really perfect and in many
situations I see a lot of informations as a date but the data type is string and that's because we have corrupt data
inside those fields and now the next important thing to check inside our data we have to go and check our numbers so
let's make sure that all our numbers has the data type number so as you can see all our Fields has the data type number
and this is really important because we want those numbers to be continuous measures in order to build the charts so
that means if you have any of those informations as a string what can happen T going to think this is a dimension and
then you cannot use it in your visuals to do aggregations like sum and average because it's a dimension so that's why
it's really important to check that all your numbers has the data type number in order to have it as continuous measure
all right so with that we have very good and solid data source the next step is that I go and try to understand the data
before I start building visualizations so let me show you what I mean let's go to the work sheet page and let's start
just randomly check the data inside the data source so all what I want now is to get closer to the data to the content of
those tables because normally in projects we have a lot of tables and if you don't understand the content of the
tables it can be really hard to find your informations and build the correct charts I know that you have practiced
with most of those informations before but I wanted to show you what are the steps that I usually do inside the
project in order to build really nice visualizations so now I go for example and check okay what is category which
values are inside it and with that I can see we have three values that means we have loow cality inside the category and
then I go I check another example examp let's say the subcategory drag and drop it over here and I can see that okay
there's like hierarchy between those two dimensions and then I go and take something else like the segments over
here and now we can see that we have a lot of duplicates inside the data which means maybe there is no relationship
between those two dimensions and the segment so if I brag it to the starts still there is like duplicate so there's
no relationship between those informations so I go and drop those information I can see okay we have three
segments so those are actually segments of the users and not for the product so as you can see step by we are learning
the data inside our data source then the next step which is interesting do we have a lot of countries inside our data
source so let's drag and drop the country as you can see we have only one country so this data is about the USA
Data then interesting which regions do we have inside the data so we have all four regions and states and so on so as
you can see I'm just browsing the data so this is really important step in order to understand the business and
start discussions with the users of those dashboards that you are creating reading your data understanding your
data before creating any ch or any visualizations all right so now once you are done browsing and understanding the
content of our data we can go to the next step where we're going to go and start building our
charts all right so now we're going to start implementing the requirements by creating the charts and we're going to
start with the first charts where we're going to go and build pans so the requirement says display a summary of
total sales profits and quantity for the current year and the previous year and let's not forget the requirement that it
says the dashboard should allow users to check historical data by offering them the option to select the desired year to
be the current year so now let's start with the first band where we're going to focus on the total sales so now let's go
to our data let's go to the orders and check the informations that we have inside the sales let's grab it to the
text over here and now with us we have the total sales inside our data for all years but the requirement says we have
to show the total sales for the current year so let's take for example the order date and put it to the rows over here so
as you can see now we have the sales for all years and not only for the current year so that means I need F
that shows only the sales for the last year for 2023 in order to do that we have to go and create a new calculated
field so let's go and do that and we're going to call it current year sales and then the function going to be really
easy we're going to check whether the current year is 2023 if it's true then we're going to show the sales otherwise
we will show nothing and for that we're going to use the if condition so let's go and chuse that and then what do we
need is the year of the order date because the condition is based on the year so if the year equals to 2023 then
what can happen we will get the sales right otherwise if it is not 2023 I don't want anything so it's going to be
null so that's it let's end it so again the logic is very easy we are checking the year of the order date if it is 2023
then show the sales if it's false then don't show anything it's going to be null so let's go and hit okay and with
that we got a new calculated Fields the current here sales let's go and grab it to the view over here to check the data
so now as you can see this field now is showing us only the sales for the current year 2023 so this is for the
first Fields but in the requirements it says we need as well to show the sales of the previous year that means we have
to show the sales of the 2022 so in order to do that we have to create as well again a new calculated field to
fulfill this requirement so let's go to the current year sales and go duplicate in order to create the new calculated
Fields so let's go and edit it so now what we're going to do it's really simple instead of having 2023 we're
going to go and make it one year less it can be 2022 all right so let's go and hit okay with that we have the previous
year of the sales so now let's go and check the values I'm just going to take it and put it here in between those two
values and with that as you can see we have the previous year of sales so with that we have the sales of 2022 so now we
have the two main calculations for this project we have the current year and the previous year for the sales so how to
make those two Fields Dynamic we can go and use the parameters in Tableau and now before we create the parameter we
have to create one more calculated field in order to have the years of order dates so that later we can use it inside
the parameter so let me show you what I mean let's go and create a new calculated field let's call it order
date and it's going to be the years then what we're going to say we're going to use the function year and inside it
we're going to have the order dates so this field going to return always the years of the order date so that's it
let's go and hit okay and now we're going to go and create our parameter so right click over here and create
parameter now we have have to go and give it a name it's going to be select a year and the data type going to be
integer since it's going to be years so there is no floats and now we have to Define what is allowed to be used as a
value inside this parameter if you leave it all then the users can go and insert anything which is not really good
because then the users have to go and guess how many years do we have inside our data but instead of that we have to
give them a predefined list of all years that we have inside our data and for that we're going to go and check a list
over here and then the values inside this parameter going to come from the new calculated field that we called it
years for the order date so let's go over here add value from and then we're going to go and pick our new calculated
field this is really good first because it is automatic you don't have to go and manually add all those years and second
later maybe you get a new year inside your data and you don't have to go manually and adding those informations
it going to be automatically added to the list so we are almost fine but I'm not really happy with the format as you
can see we have here the south end point so let's go to the display formats and what we're going to do we're going to go
to the number custom let's remove all those decimal places and as well the display unit going to be none so that's
it so what we're going to do we're going to go to the number custom over here let's remove all those decimal places
and as well remove the Thousand separator all right so that's all let's click over here then as you can see we
have now the years without any separator that thing do we have to go and make the current value as the last year so let's
go to the current value over here and select 2023 so that's all for this parameter let's go and hit okay and as
you can see we have it on the left side now the parameters Let's Go and show it for the users so show parameter to The
View and now the users can go over here and start selecting what is the current here so as you can see if I'm selecting
the years nothing is changing inside our view and that's because we haven't Now link this parameter inside the
calculation and this is exactly our second step so let's go and do that let's go to the current your sales over
here and let's go and edit it and now instead of this static value the 2023 we're going to go and add our parameter
so let's trite the name of the parameter it is Select year and that's it so what you are seeing now if the year of order
date equals to the selection from the user then show the sales otherwise shown nothing so let's go and hit okay and
let's go and try that so let's focus on the current year sales and let's go and change the value to 2022 and as you can
see now the current year for the sales it is the 2022 and the same if you go over here and make it 2021 so as you can
see everything is dynamic and the users now can go and select what is the current year so now the next with that
we're going to go and integrate it inside the previous year so let's go to the previous year edit it and the same
thing instead of 2022 we're going to say select year but now since we are talking about the previous year what we're going
to do we're going to go and subtract one year so that's it let's go and hit okay and now let's go and test again so 2023
everything is fine let's go and switch the current year to 2022 so let's do that and now we can see that both of
those two values did react to our selection so now the previous year is 2021 1 and the current year is 2022 so
with that we have completed the first requirement inside our user story where the users can go and decide which year
going to be the current year and we made it completely Dynamic using the parameters all right so with that we
have our main calculations for this projects where we have the current year and the previous year of the sales so
now the next step as we decided in the mup we want to show the differences between the current and the previous
year and we're going to have it as percentage in order to show the qbi so let's go and create a new calculat field
and we're going to call it percent difference sales so the calculation going to be really easy so we're going
to go and subtract the current year of sales from the previous year of sales but now since we want to present it as a
percentage we have to go and divide it by the previous year so let's add starting and ending brackets and divide
it by sum of previous year with that we will get the percentage of the differences between the current year and
the previous year for the sales so let's go and hit okay and with that we got our new calculated fields and now what we're
going to do we're going to go and change the format to percentage so right click on that and then let's go to default
properties number formats and now let's go to the percentage and let's have only one decimal let's hit okay now in order
to show those values here let's go and remove the year and now let's go and check the value of the differences
between the current and the previous year and with that as you can see the differences between the current year and
the previous year is around 29% so again we can go and check our parameter to see with whether everything is working fine
so let's go to 2023 as you can see the difference now is only 20% all right so with us we have almost everything that
we need in order to build our first pain so I'm going to call this first cheat as a test in order just to test the data so
let's go and create a new worksheet kpi sales and we're going to start building our first charts so now if you check our
mup our kpi has two parts the first part going to be the pants where we have the big numbers and the second part going to
be the spark line so here we have two options either we're going to go and make dedicated sheet for each section or
we make everything in one sheet like the whole qbi in one sheet and we're going to do that so what we're going to do in
the title it's going to be the pan so we're going to put all the informations of the pan inside the title and then
inside the view we're going to go and build our spark line so let's start with the pans first what do we need for
informations is the current here of sales let's go and grab it on the details and then the second information
that we need is the difference of sales so let's grab it as well to the details over here and that's it for now let's go
now to the title and start building the pan so double click on the title and now in the first line we're going to give
the name of the measure so it's going to be the total sales and then the second information it's going to be the current
years of sales so let's go to insert over here and add the sum of the current year sales and the third information is
going to be the differences so new line and let's go and add our calculation the difference of sales so now let's go and
hit apply in order to see the informations as you can see now we have total sales we have the total number of
sales for this year and as well at the end we have the differences so so now we're going to go and start formatting
this pan so what we're going to do we're going to go over here to the total of sales let's make it the font Tableau
book and then let's go and reduce it little bit more to 14 and now the next we're going to go to the total sales and
we're going to make it really big so let's select that let's take the font to bold so Tableau bold and then let's go
and increase the font to for example 2022 and make it bold as well so here we have really to make it really big so
let's go and hit apply just to check the numbers so as you can see we have total sales small then a big number which is
really great so now for the next one we going to go and select it let's choose for example the Tableau semi bold and
then make the size to 20 then we're going to go and add the text of versus previous year all right so let's go and
hit apply so now everything looks fine this information is not really IR relevant to show it very bold inside our
data so let's go over here and change the fonts back to Tableau poke and as well let's go and change the coloring as
well something like here really light gray so as you can see everything looks fine now let's go and change the
coloring and the format of the text because this is not really irrelevant information so we're going to go over
here and change it again to tblo book and then let's go to the coloring and make it like light gray little bit so
let's go and hit okay now you can see that our band look really nice so let's go and hit okay what I'm going to do I'm
just going to go and change the format of the total sales so right click on the current year of sales and then let's go
to format then instead of having the axis let's go to the pan over here and go to the format of numbers let's go to
the number custom remove the decimal numbers let's have the unit as thousands in order to make it more easier to read
and let's add the dollar sign in the prefix so now things looks more professional so we have the dollar sign
and as well the number is rounded to thousands all right so now the next thing what is missing inside our qbi if
you look to the mockup we have decided to add the qbi symbol so we need an icon to indicate whether the sales is going
up or going down in order to do that we're going to go to the differences and change the format
so let's go to the differences to the formats and then let's go to the format of number over here and let's go to
custom and then we're going to go and add the following format in order to indicate the qpi I will leave this
format in the description as well in order for you to copy and paste it so here what we are seeing if the
percentage is a positive number it going to be up if it is a negative number it's going to be down and of course if you
want to add more decimals to the percentage you can go over here and add a zero so as you can see once I add zero
the format going to change but now for that I would like to have only one decimal all right so that's all so as
you can see now we have a really professional band where we have the total sales of the current year and as
well we have the differences between the current year and the previous year using a really nice qpi so now of course we
can go and test it let's go and show the parameter to the right side and let's go for example to 2022 and as you can see
everything is changing perfectly 2021 and now you can see the arrow is down because the previous year was higher
than the current year perfectly so with that as you can see ins inside the title we have created the pan now the next
step it does we're going to go and create the spark line all right so now let's go and build our spark line it's
going to be based on the months don't forget the requirements it's to show the current sales based on the month and
then compare to the sales of the previous year so first let's go and switch the parameter to 2023 and let's
go and get our order date to the columns and now what we're going to do instead of having years let's go and switch it
to months and then we're going to go and grab the first measure it's going to be the current years for the sales let's
put it to the rows and now instead of having discrete line I would like to have it as continuous line so let's go
to the mons over here right click on it and switch it to continuous so now what we're going to do we want to compare it
to the previous year in order to do that let's go and get the previous years of sales and now since both of the charts
going to be line charts and going to be on top of each others we're going to use the measure names and values so let's
drop it on the axis over here now you might notice that we have broken our pan so we have here like a range between the
lowest value and the highest value we don't want that but we will fix it later don't worry about it so now let's keep
focusing on the spark lines so with that we have our two lines now what is missing is to highlight the highest
value and the lowest value of the current year so now in order to get those two circles on top of our view we
have to go and add another measure but first we have to go and calculate it using calculated Fields so let's go and
create a new calculated field and we're going to call it min max of the sales so now we're going to go and search for the
highest and the lowest values of the sales so in order to do that we're going to go and check a condition using the FL
statements so let's start with the first one we're going to say if the sum of the current here and now we're going to go
and check whether this value is the highest between all other current sales so what we're going to do we can use the
function of window and Max since we are searching for the highest value and then inside it we are comparing all those
current years so current year of sales so now we are just checking whether you are the highest value if it's true then
what can happen then show the value so sum of current year of sales so that means if you are the highest value then
show yourself show the value otherwise we're going to go and search for the lowest value so else if we're going to
take the same stuff sum of the current year equal but now instead of window Max we're going to use window Min so I'm
just going to go and copy everything from here and replace the max with Min so now what can to happen if you are the
lowest value we're going to do the same show yourself so we're going to show as well the value of the current year for
the sales otherwise we don't want to see any values so what we're going to do we're going to go and say ends so that's
it the calculation is valid let's go and hit okay so now we have it as a new field but I would like to test the value
whether it's working so instead of throwing it now to the visual let's go to another sheets let's grab the order
date to the roads switch it to month I just want to check whether everything is fine let's grab the current year of
sales to the view so now with that we have the sales of each month and now let's go and grab the new calculated
field the min max and drop it over here so now let's check the table what is the lowest value it's going to be the
februar so as you can see we have the Min and what is the highest value it is November so now as you can see this
calculation is working so here my recommendation for you if you are creating something complicated always go
and test in the table in order to see the numbers before you switch it to like circles or lines because with those
tables we can go and validate better so let's go back to our qbi sales and let's grab our new valuee in Max sales and
drop it to the row so with that we got our new charts because we have a new measure over here and we have as well in
the marks a new tab for the min max so now let's go to this tab in order to configure the min max instead of
automatic we want to have circles and as well we're going to go and make it a little bit bigger in order to see those
circles so we have here the Min and the Max and now let's go to the first chart so we're going to go and switch it over
here and make sure instead of automatic it's line because we're going to go as a next and merge those two charts in one
so in order to do that we're going to go and use the Dual axis so right click on the minmax over here use the Dual axis
the axis on the right side and maybe just hide it from the right side over here so as you can see we have now those
circles on top of our line charts and with that we are highlighting the highest and the lowest value inside our
spark line so now we have our spark line but now let's go back to our ban and fix it so as you can see we have a range and
that's because inside the view we are using the month as continuous fields and tblo going to go and make it as a range
and this is the disadvantage of having everything in one charts that are like related to each others so what we're
going to do we're going to go and fix it by doing the following so now in order to fix this we're going to use a trick
in order to make it fix and does not like react to the things that we have inside our view so let's go and double
click on the first one and we're going to add at the end Open brackets so let's add it at the end and as well to the
starts and let's go and hit okay and as you can nothing is changed because we have to go inside the title and change
stuff but let's keep changing those stuff let's go to the second one double click on it Open brackets at the end and
let's add it to the starts so let's go and hit okay so now the next with us we're going to go inside the title and
start fixing it so double click on it and as you can see missing Fields because for Tableau this is a new field
so side by side I'm going to go and add the sum of the current year of sales and then I'm going to go and remove the
missing Fields the same thing for the second one we're going to go and add the differences and remove the missing field
and as well we have to go and change the coloring again from Red because it was a warning and let's add it as black for
the second one as well all right so let's go and hit okay so now as you can see everything is packed to normal and
we have again our pan all right so with that we have built our chart and the next step is that we're going to go and
format it in order to make it a beautiful chart right and this includes a lot of stuff like removing the lines
removing the grids removing the headers axis adding coloring simplify everything right so let's start with the easy stuff
where we're going to go and remove those grid and those lines so right click here on the empty space go to format and then
we're going to go to the left side over here let's go to the lines let's check the zero lines to none let's go to the
rows remove the grid as well so now as you can see we don't have any lines here in the middle let's go to the grid over
here and let's go to the sheet and start removing everything like any line should be none so with that we are removing
everything inside our grid all right so now as you can see we have cleaned up all those lines inside our chart and
everything looks really clean the next with that we're going to go and work with the axis and headers let's go and
remove the a over here so right click on it and let's remove the header so now we might ask why we are removing a lot of
stuff and that's because in the dashboards if you add a lot of informations you're going to distract
the users and they will not focus on the important stuff which is showing the trend inside the view so we have to
reduce a lot of informations and only present the relevant informations so really here you have to be very
minimalist in the design so now what is lift is the mes over here so right click on that let's go to the edit ax we want
to remove the title from it so let's go and remove that and as well we're going to go and indicate that those
informations are months so right click on that and format and then let's go to the dates over here and let's have an
abbreviate so as you can see now we have abbreviations of each month let's go and clear this so now the goal is to show
for the users this park line is based on the months and we don't want to show all those information so it's enough to show
only few values so I would like now to show only January and December and remove all other information so once you
see it's January and December you will immediately understand this is B based on the muscles so what we're going to do
we're going to go and edit the ax again and change the axes so let's go to the tick marks over here and let's go to
fixed and now next we're going to go and change the text so it's going to start from January and it's going to show the
value of December so after the interval of 11 values it going to show the last month so as you can see now we are
showing January and only December and everything is between is not shown so that's it let's go and close it and as
well we have those nulls let's go and remove them so right click and hide indicators so now as you can see see we
have everything cleaned up and we have only the line charts and here we are indicating that it's based on the month
of course now what is left is the coloring of our charts so as I said I'm following here only four colors so here
we have our basic colors but now let's go and change those informations so now we're going to do we're going to go and
change the lines let's go to the lines over here and start working on the coloring so edit colors so now I would
like to have the current here of sales to be very dark gray and the previous year going to be like in the background
as light gray in order to do that let's go and double click on the first value so now what we're going to do we're
going to add our colors inside the custom colors over here in order to configure it only once and keep using it
in all other charts so let's start configuring the Colors Let's click on the first cell over here so make sure
you are selecting it then let's make it as something like here very dark gray and then the next we're going to go and
add to custom colors so let's click on that so with that as you can see we have defined the first color and let's go and
hit okay so with that we have defined the first color let's go to the brid previous year sales and as well make a
new color so let's go to the sale over here beneath it and let's make it something like here it's going to be the
light gray and let's make it more lighter all right something like this let's add to custom colors and hit okay
all right so now let's go and hit okay and with that as you can see the current here is going to be the black one or the
very dark gray and in the background we have the previous year of sales so now next we're going to go and change the
coloring of those two circles so let's go to the Min Marx and the marks over here here and let's grab the minmax
sales by holding control and put it to the colors all right so now let's go to Colors edit colors and now instead of
automatic let's go and switch it to custom over here the last one and then we're going to change the steps to only
two steps so now we're going to start on the right color where we're going to define the max value so let's go inside
and now we're going to Define our third color so let's click on empty cell over here and let's add the code of our third
color the turquoise all right then let's go and add to custom color over here so as you can see we have our third color
let's click okay and now we have to define the left color it's going to be the minan value so click on that and
we're going to Define our fourth color so click on the empty Cale over here and let's add the code for the orange and
then let's go and add it to custom colors and with that we got our four colors that we can use in all our chart
inside this projects so that's it let's hit okay and hit okay and now as you can see we got our two circles the highest
value the minan value using our coloring and now the last touch that I'm going to add to this chart is to reduce the
opacity of those two circles so let's go to the colors over here and reduce it from 100 to something like 70% so that's
it all right so now the next step after formatting our charts what we're going to do we're going to go and work on the
tool tip so if you Mouse over anywhere in the lines you can see that we have a tool tip and it's not really nice so as
you can see it looks like calculations and not human readable so what you're going to do now we're going to go and
edit those informations so now in order to do that let's go to the tool tip over here in the mark and then we're going to
get this box so here we can see in this window it's very similar like you are editing a title or any text in Tableau
so here you have two different types of text the one that is not highlighted this going to be static and the one that
is highlighted with this light gray backgrounds it's going to come from the charts so now what we're going to do
we're going to go and remove all those informations and start creating our tool tip so let's start with the first one
sales and then we're going to have off and then we're going to go and add the month so we're going to go over here
into insert and then let's insert the month order dates and here we're going to go and add the current year we can go
and use for example the parameter for the selected year but we're going to have a problem as we're going to show
the sales of the previous year so for that in order to show the years inside the tool T we're going to go and create
some calculated Fields so let's just close this and we're going to go back to it later so now just check the tool T
tape as you can see we are going to get the sales of March April and so on so we don't have L the formations but now
let's go and create a new calculated field and now we're going to call it the current here so it's going to be really
simple it's going to be the value that the user selected from the parameter so that's it select here let's hit okay and
now as you can see we have the current year in the data let's go and create another one for the previous year
previous year and it's going to be as well select year but this time we can subtract one year from it so that it
let's go and hit okay but now I would like to go and change them to Dimensions because they are not measures so right
click on the current year and let's change it to Dimension the same for the previous year here so let's go and
convert both of them to Dimensions all right so now we're going to go and grab all the informations that we need in the
tool tip to this box over here to the tool tip and as well the previous here just drag and drop it on top of this box
here and let's go and show the informations about the current sales and the previous sales and the differences
between them all right so now we have all the information that we need for the tool tip let's go inside the tool tip
and start configure ingots so let's go over here and now after the month what we're going to do we're going to have a
comma and then let's mention the year so it's going to be the current year this one over here all right so after that
let's have double points and let's go and insert the current sales so insert and now make sure to select the current
year of sales this one over here and not the fixed one so it's like fixed but now we would like to show in the tool tip
the sales of the current month so in order to do that we're going to go and select the sum of the current year for
the sales without any fixed so let's go and select that we're going to go and do the same stuff now for for the previous
year so sales off we're going to add again the month so now we're going to go and do the same stuff for the previous
year so sales off we're going to have again the month so let's go and grab the month comma and then we're going to go
and add the previous year so it's going to be this one over here so previous year double points and then let's go
that gets the sales of the previous year okay so now the next information the next line going to be the sales
differences so let's say say differences then double points and now let's go and add that differences and here again make
sure to not use the fixed one that we have inside the title let's go and get the variable one so the one that we
added from the data pane so this one all right the last information that we're going to show inside our tool tip is the
minan max values so the highest lowest sales double points and let's go and grab our measure is going to be the min
max sales so let's go and select that all right so that's all the information that we want to add inside our tool TP
let's go and hit okay okay and check the results so for example let's go to the blue point over here so now we can see
that the sales of the current year for the month November it had this value and as well it can be compared for the sales
of the previous year for the same month and then we can see the sales differences and what is the highest and
lowest value so now as you can see as we are moving to different months the values inside the tool tip going to
change so now as you can see the format and the design of our tool tip is not really nice right so for example we have
the thousands dots and as well everything bold so it's not easy to read as well the alignment of those
informations are not really nice so now we're going to go and format it all right so now let's start first with
formatting the current and the previous year so let's go to the current year and let's have the default properties and
then format number we're going to have it as custom let's reduce the decimal numbers and as well remove include
thousand separator all right so now let's go and hit okay and let's just test so now as you can see 2023 don't
have any dots let's go and do the same for the previous year so let's go to the default properties and then number
format and as well let's go to the number custom reduce the decimals and remove the sou separator so now the next
one what we're going to do we're going to go and adjust the format of the numbers as you can see the current month
has different format than the previous month so now in order to do that let's go to the previous sales over here right
click on it and let's go again to the default properties number format and we're going to go again to the number
custom let's remove the decimals the unit display is going to be thousands and we're going to add the dollar size
so let's go and add it and then hit okay so now let's check again so now we can see now both of the numbers have the
same bar format let's check the Max and Min you can see the Max and Min has as well the same problem so let's go to the
min max value as well to the default properties number format and then let's go to the custom remove decimals add the
dollar sign and don't forget to add the unit so it's going to be the S so let's go and hit okay all right so now all our
numbers has exactly the same format and now what we're going to do we're going to go and format the T next so let's go
back to the tool tipe over here all right so now we're going to go and work with two colors the light and very dark
gray so let's select the first part where we have a text we don't have a value so this is going to get the light
gray let's take this value over here and let's remove the Bold as well all right so now let's do the same for all other
stuff so we're going to select the text have the light create remove the Bold as well for the next
informations all right so now next for the next informations as you can see see they have exactly the color that we need
and as well they are bold so make sure that everything has a dark gray and as well as the Bold so everything so far is
fine let's go ahead okay and test so let's over to this point over here so now as you can see it's really easy to
read where we have a different coloring for the text and the value all right so now the last thing that we're going to
do inside the tool tip do we're going to change the alignment of the numbers so as you can see all those numbers starts
from different positions so now let's go and change the alignments in order to do that let's go again to the tool tip so
now what we're going to do we're going to go and add a tab exactly after the double points and make sure there are no
white spaces so we're going to go over here to the first one let's add a tab and now let's go to the second one I
believe we have here an empty space so let's just remove it and add a tab all right so the next one I believe I have
space so let's remove it and add a tab and for the last one the same thing remove the space and add a tab the tab
can go and automatically and do the alignment for all those numbers so that set we have all the tabs let's go and it
okay and now now let's go and test so as you can see all the numbers start from the same position let's go to the point
over here as well so as you can see everything looks really nice all right so with that we are done and we added a
very nice and readable tool tip inside our charts so let's do a quick summary for the steps first we create our
calculated fields that we need inside our charts and we do testing then the next step we start building the chart
the third step we start cleaning and adding format to the charts and the coloring as well and the last step we go
and work on the tool tip perfect so with that we are done formatting the kbi of sales and everything look really
beautiful so now we're going to go and do exactly the same stuff twice once for the profit and once for the quantity so
we're going to do exactly the same stuff by creating the measures creating the titles and then The Spar CLI so now what
you're going to do you're going to pause the video and start creating those two kbi eyes exactly following the same
stuff starting by creating the calculated field for the current here of the profits and ending up by having
something very similar to to here but instead of total sales you should have the numbers from the profits so I'm
going to go and do it offline and then we're going to [Applause]
[Music] [Applause] meet two hours later all right so that's
why a lot of calculations and a lot of stuff but exactly the same steps so I hope with that you are done building the
other two qpi so now we have a qpi for profits for quantity and as well for sales and all of them looks like really
similar all right so now we are halfway there we are done with the first two requirements
then the second two requirements is to build the charts about the subcategories and the weekly Trends so now let's start
with the first one the subcategory comparison so what we're going to do we're going to go and compare the
current year and the previous year of sales by that subcategory and as well we're going to go and add the profit
informations and we have decided in the mockup to use bar inar charts for the sales of the current and previous year
and as well another separated part chart for the profits all right so now let's go in tblo and create these charts let's
go and create a new worksheet let's call it subcategory comparison all right so now the first step with that we're going
to go and ask ourselves do we have all the data that we need for this charts or do we have to create any calculated
Fields I think for these charts we are safe we have almost everything so this is what usually happens in the projects
for the first chart you're going to end up creating a lot of calculated Fields but as you are creating views and charts
you will have less need of creating new calculated fields so now let's go immediately and start building our
charts let's go and get our subcategory so we're going to go to the products over here drag and drop it to the rows
and then we need the two measures previous year and the current year so let's start with the previous year of
sales let's drop it to the columns so this going to be the first bar where we have it in the background now let's go
and get the second bar for the current year of sales so drag and drop it to the view over here so now what we're going
to do we're going to go and bring them together in one chart on top of each others but before that I would like and
go and format it a little bit so that immediately we're going to get the bar and bar chart so what we're going to do
we're going to go to the second tab here in the marks and let's go and make the size smaller and now next we're going to
go and change the color as well so let's go to the color over here and let's go to more colors in order to get our
colors right so let's get the dark one and hit okay and next what I'm going to do instead of automatic I'm going to
make it bar in order to make sure that once we merge everything it stays as bar and doesn't break so now let's go to the
background to the left one and formatt it as well so let's go to the colors more options and now we're going to get
the light gray so let's select that and hit okay all right and as well we're going to make sure that it is a bar
chart all right so with that we have got the background and the front let's go and merge them right so let's go to the
current year of sales right click on it and let's use the Dual axis great now we have bar in bar but as usual we have to
go and synchronize them so right click on the current here of sales synchronize access and as usual we're going to go
and hide it so right click on it and hide the header all right so with that we have the bar and bar chart we will go
and format it later don't worry about the look and feeling of these charts let's go and add the profit now right so
let's go and grab the current year of profit and drag and drop it to the columns as well so as you can see it's
really easy right we got now a second chart for the profit side by side to the sales so now the next thing that I'm
going to go and show the parameter as well in order to test it so let's go and show parameter and now let's go and
change the year for example to 2022 and see that everything is changing so everything is working as intended so
let's go back to 2023 all right so that's it we have created the charts it's really easy working with Spar
charts compared to the qbis right so now let's go to the next step where we're going to go and start cleaning
formatting changing the color changing the sizes so let's go and do that so first let's go and hide all the lines
inside our grid so right click on the empty space go to format let's go first to the lines and check what do we have
over here so make sure to have the Zer line away rows columns so let's go remove the columns as well so that's it
for the line let's go and switch to the borders or to the grids and let's go to the sheet over here and start removing
everything so we don't need any lines so that's it now our chart is really clean and we don't have any lines next we're
going to go and start hiding the axis and some informations in the headers so let's go to the axis over here and
remove the header and as well we can go to the headers informations over here but we want to just hide the title The
subcategories so right click on it and then hide the label so with that we removed it we don't need it because we
have it in the title later all right so now the next with that we're going to go and start formatting the coloring and
the fonts and so on so now let's go to those informations to the subcategory right click on it and let's go to
formats and now let's go to the font over here let's make it dark and as well let's go change the font to a medium
Tableau medium and let's make it 10 so in order to make it more clean all right so that's all for this information now
let's go and start formatting the charts so now what we're going to do first let's go and change the sizing of those
parts on the left sides so let's let's go to the previous sales it's going to be the background let's make it a little
bit bigger and then let's go to the front one to the current year and make it thinner so let's go to the size over
here and just make it smaller in order to see the effect of bar and bar all right so this is way better than before
so that's it and of course here's the coloring is working because we changed that before but now what we're going to
do we're going to go and change the coloring of the profit so let's go to the current profit and what we're going
to do we're going to add the measure to the color so hold control and drag and drop the profit on the colors all right
so now let's go and edit those colors now what we're going to do we're going to go and change the steps to two steps
and let's change the positive and the negative values so the positive one we're can to use our color over here the
turquise and then for the lower value we're going to use the orange so let's go and change that so that's it let's go
and hit okay and with that we can immediately identify which subcategories has a positive profits and which one has
a negative one all right so now we are done with this step where we have cleaned and form everything inside these
charts but now before we go to the next step where we're going to work with the tool tip I would like to add here a qpi
to indicate where do we have an issue that means I'm going to show an icon when the current year is less than the
previous year so in order to do that we're going to go and create the qbi let's go and create a new calculated
field let's call it qpi current year less than previous year so now it's really easy if the current year is less
than the previous year for the sales we're going to show an icon so in order to do that we're going to use the
condition so if and we're going to check check the sum of the current year of sales is smaller than the sum of the
previous year for sales so what can happen we're going to go and show an icon so we're going to say then and
we're going to add the circle and now of course the question is how to copy the circle I'm going to leave this
calculation in the description for you to copy and paste so now what can happen if the condition is not fulfilled so
we're going to say else it's just empty so that's it let's end it so the calculation is valid let's go and hit
okay and now what we're going to do we're going to grab this in new calculated field and just put it in
front of the subcategory so now we can see immediately where we have bad performance for the sales we have three
categories with this three circles so now let's go and format it I'm just going to grab the bars and put it side
by side to those circles and then we're going to go and change the colors as well so right click on the circle let's
go to format and then let's go to the font over here let's go to more colors and we're going to go and get the orange
since it is always like loss so let's go and hit okay so of course we can go and test stuff let's go and change the year
to 2020 22 so we have again different subcategories with issues and let's go to 2021 and here we can see we have a
lot of subcategories where the current year is less than the previous year all right so as you can see it's really nice
qbi in order to show immediately where do we have any issues so now let's go and switch it to 2023 and with that we
have our qbi but now I would like and go and sort the data in order to have it as a rank so let's go to the subcategory
over here and let's go to sort and then let's go and switch it to field and we're going to choose the field to to be
the current year of the sales and let's have it as descending so we have like a rank all right perfect let's go and
close it all right so that's it I'm really happy with the view let's go now to the last step where we can adjust
that tool tip okay so as first step let's go and add few informations to our tool tip so what we're going to do we're
going to go and grab the previous year of sales so by holding control put it in tool tip the current year and the
profits and then we're going to go and grab our current year and the previous year and as well let's go and add the
differences between sales to the tool tip as well all right so now let's go inside and start configuring those stuff
so let's check the first one going to stay as it is so the subcategory then let's have next the current sales so I'm
just going to cut it and paste it over here but I would like to go and change the text so it's going to be sales of
and then we have to go and insert the year right so the current year and then we're going to add the double points and
make sure to remove the space and add a tab all right so the next line going to be about the previous here so I'm just
going to cut and paste and then change the text to sales off and let's go and insert the previous year so let's just
make sure that we have a tab after the double points perfect and then let's go and add that differences so let's go and
get the differences over here it looks nice I'm going to leave it as it is and then the last info I'm going to go and
add the profit so we going to add the profit over here so profits off and then let's go and add the the year the
current one so the profit of the current year it's going to be the sum of the current year of profit so let's make
sure that we have the tab so that's it let's go and remove everything else and with the coloring everything looks fine
let's go and hit okay so now let's go and test it and now we can see everything like formatted really nicely
so the subcategory is machines the sales of the 2023 2022 the differences between them and the profits and you will get as
well the same informations if you go over here to the right side to the profits so now the last thing that I'm
going to change is the format of that 2023 for the sales so let's go and change that right click on it and then
let's go to format the usual stuff we're going to go to the number to the custom remove the decimals add the units and
then the prefix of dollar sign so that's it so now let's go and test it and with that you can see the numbers of sales
and profits follow exactly the same format so that's it for the tool tip and the last step for this chart now
everything looks really professional so with that we have completed the third requirement for these dashboards where
we compare the sales and profit informations by the subcategory all right so now we're going
to move to the last requirement to the last chart for our dashboard we're going to create a line chart in order to show
the weekly trends for sales and profits and as well we have to show the average line for both sales and profits and we
have to highlight what is above the line and below the line so let's go and create a new worksheet so we're going to
call it the weekly Trends all right so now the first step do we have all the data that we need in order to build the
chart well yes we have the current here for the profit and for the sales then that means we can now go and jump
immediately building our charts so since it is a weekly Trend we need the order date so let's go and get the order date
put it to the columns and now let's change it from year to weeks so right click on it let's go over here to the
more and then week number but we would like to get a continuous line it's always better than a discrete line so
right click on the weeks over here and let's switch it from discrete to continuous all right so with that we got
the number of the weeks and now let's go and get our measures so the first one going to be the current year for the
sales and the next one going to be the current year for the profits and with that our view is splitted into two
charts one for the sales and one for the profits and with that we can see the weekly sales and the weekly profits all
right the next step is that we're going to go and add the reference line for each measure so let's start with the
sales right click on it and let's go and add a reference line so here we have everything prepared everything is fine
average of the sales I'm going to go and change the label from computation to custom and let's add the following so
average and then space and now let's go and add a value and that's it for now so with that we have a really nice average
line inside our chart for the sales let's go and do the same for the profit so right click over here add reference
line some of the value is the profit and the calculation is average let's go and change the label to the same stuff so
average and then space let's go and insert the value and that's it let's go and hit okay so with us we have
fulfilled the two requirements first we have the trends for both of the sales and the profit and we have an average
line for both of the measures now you might ask why we don't go and merge those two charts in one using the Dual
axis well I would do that if we don't have average lines so imagine now we merge both of them and then we will get
two average lines it going to be really hard to read the charts so for this scenario since we are focusing on the
average it doesn't make sense to meas them together then it's going to be really hard to read so this means for
this requirements we're going to leave them separated from each others well that's it for building the charts it's
really easy right so now we're going to go to the fun part to the next step where we're going to start cleaning
formatting adding colors so let's start doing that we're going to start by removing the lines so right click on the
middle let's go to format and now first we start with the lines so let's remove any lines inside the sheets inside the
rows and the columns all right but this time we will not go to the grid and remove any lines because they are really
important in order to separate both of those charts so we will not touch anything here so only the lines and not
the portals all right so that's all about cleaning up the lines let's go now and clean up and formats our aess and
headers so let's start with the weeks over here what I'm going to do I'm going to go and just remove the title so let's
go over here remove the title in order to have more space all right so now let's go and format those axess I will
just change the title to only sales so let's remove the first part the same thing for the profits let's just have
only profits so that's it and now we still have an issue we have different formats for the numbers so as you can
see we have here the dollar sign and on the sales we don't have it so let's go and format added this time from the data
Bane so right click on the current year of sales let's go to the default properties number format as usual we can
remove the decimals add the unit and add the dollar sign so that's it hit okay now as you can see we have exactly the
same format and as well for the average all right so that's it for the access and hits let's go and now format the
reference line so right click on the reference line let's go to format and now what we're going to do we're going
to change the line to a dash line and as well increase the opacity to around %. all right and as well let's change the
color of the font to make it a little bit darker okay so that's it for the first one let's do the same stuff for
the second average line right click on it go to format change it to Dash and let's increase the osity so around
40% and the font let's make it darker all right so with that we have formatted both of those average lines so with that
we have formatted everything around our charts so now we're going to go and start formatting our line charts so now
what we can do for those lines we can change it from linear to steps in order to make it more interesting so what
we're going to do we're going to go to all and then let's go to path and then instead of having the linear let's go to
the steps so now as you can see our charts going to look more interesting than the boring linear so now let's talk
about the coloring of those two charts because we have a requirement so that says we have to highlight the week
that's above the average and as well the below average so we're going to use the coloring in order to do the highlights
and now we might say it's really easy let's go to the colors for for example to the sales let's hold control and put
the colors over here well you can do that but it's not really 100% correct because you can see we have the light
colors below the average and we still have here as well a light color above the average so in order to be more
precise we have to go and create calculated field for the coloring so let's go and do that first for the sales
let's go and create a new calculated field we're going to call it qbi sales average and for this
calculation we want only two values as an output either it is above the line or below the line so in order to do that we
have to go and check that using the f statements so let's start with the F statements and let's say if the sum of
sales of the current year for the sales is higher than the average so let's say higher and now in order to check the
average for the weeks what we're going to do we're going to use the window average function and then inside it
we're going to have our aggregated field the sum of current year for the sales so now what we are doing over here we are
just checking whether the sales is higher than the average sales but we are using the window function because we
care only about this window this year so we don't want to have the average of all other years we are just focusing on the
window that we have inside our chart so what can happen if the condition is fulfilled so let's have then we're going
to have the value above otherwise we can to have the value below so that's it let's end it so that the calculation is
valid let's go and hit okay and with that we got our new dimension let's now un move it to the colors instead of the
sum of sales so now we can see immediately that and anything below the average has the color of orange and
anything above the average has the color of blue so let's go and change the coloring to our Colors Let's go and edit
the colors and now let's go to above double click on it let's have our blue or turque then let's go to the below and
get our second color so that's it let's hit okay perfect so now we have it we are highlighting what is above and what
is below the average let's go and do the same stuff for the profit so what I'm going to do I'm just going to go and
duplicate the same calculation and then let's go and edit it so now we're going to go and replace the sales with the
profit so let's start the title profit let's move and remove the copy let's have the current here of the profit and
as well here the current here of profit as well so everything is fine so as you can see we are doing exactly the same
stuff but only for the profits let's go and hit okay and then what we're going to do we're going to go switch to the
profit in the marks and let's grab our new calculated field to the colors so let's go and do that and the next we're
going to go and change the coloring so edit colors the above going to be the and below going to be the orange so
that's it let's it okay all right so with that we are as well highlighting the stuff in the profit above and below
the line and with that we have covered all the requirements for these charts but now as usual don't forget always to
test so let's go and select the years and show it to the parameter to the right side and we can start testing the
other years whether everything is fine so as you can see everything is nice now we're going to go to the last step where
we're going to add the tool tips so what we're going to do we're going to go to the all over here and let's add the
current year information that the tool tip we don't need the previous here because here we are not comparing the
current and the previous so now let's go to the tool table and check what do we have over here I think we have almost
everything that we need so now let's go and change a little bit stuff so instead of week of order date let's have the
number of week and as well let's just make sure that we have a tab after the double points and then the next one we
don't need it so now the next one we're going to have the current year for the sales I'm just going to go and rename it
sales off and now let's go and insert the current year and as well make sure that we have a tab after the multiple
points then the next one is going to say whether it is above or below the average so what we're going to do we're going to
remove this part over here and we're going to have above or below and after that we're going to add the static word
the average so since it's static let's go and format it so let's remove the bold and make it light gray okay so now
let's go and do the same stuff for the profit so instead of the current here of profit we're going to say profit of
let's go and add the current here then double Point make sure there's no spaces and then a tab and the same stuff for
the average qbi so we're going to say the average and as well format it all right so I think this is nice
let's go and test it so let's go and hit okay all right so now let's go and test if I check any value above the average
for sales we can see that the number of week the sales of 2023 and it says it is above the average so if we go below the
average we will get below the average so as you can see everything is working perfectly let's go to the profits so we
have above the average over here and we got the profit of 2023 and if we go below the average and we can see it is
below the average everything is perfect and with that we have covered the last chart inside our requirements so that
means we have now all the sheets that we need for the dashboard so the next step that we're going to go and start
building the dashboards all right so now we're going to start talking about building the
dashboards the first step of that we have to plan the structure and the containers of our dashboard all right so
now let's start sketching in the container structure the first one is as usual going to be the main container and
it going to be a vertical container and then we're going to start from top to bottom so first we have like a title and
two buttons so for that we can include a horizontal container where we have the title and the buttons moving on below
that we have the information of the QB eyes so we have side by side objects here again we can go and use another
container another horizontal container in order to have all those ski side by sides then Moving Out Below that we have
the charts right so it's again two charts Side by Sid and we will use a third horizontal container for them so
this is the main object that we have inside the main vertical container but of course in our dashboards we have as
well a lot of filters so what we're going to do we're going to build a vertical container where we're going to
put all the filters for the dashboards but this container going to be outside of the main vertical container and we
will use the floating options and this vertical container going to be outside of the main container the vertical
container and for that we're going to use the option of floating and as well the ability to hide it or show it so I
would say we will go with this plan and of course it is a plan that means as we are building the dashboard sometimes we
add like an extra container to organize stuff so we will not cover everything in the plan 100% but we will cover the main
stuff all right so now with that we have a plan for our dashboards let's go and implement it in Tableau all right so now
let's go and create a new dashboard and we're going to call it sales dashboard so now the first step that I usually do
is fixing the size so let's go in the left side to the size change it from range to fixed size and then let's go to
the width I usually go with the 1,200 and for the height let's go for 800s okay so with that we got enough
white space for our dashboards and I usually start with the main container but since we have another container
which going to be hidden and shown for the filters I'm going to start with that first so now in order to create this
vertical container I have a quick way in order to catch it so what we're going to do we're going to take any worksheets
let's for example go with the qbi sales let's drag and drop it to the middle so as you can see table going to go and
automatically create a vertical container on the right side where it's going to put everything inside it the
parameters filters Legends and so on and this is the container that we're going to use for our filters so now what we're
going to do we're going to go and convert it to a floating element or floating container so in order to do
that hold shift and then click on this icon over here and then just move it so as you can see now it's like freed and
let's drop drop it anywhere so now let's just move it here to the end and what we're going to do we're going to go and
remove this chart because we have to go now and build the main container so let's go and just remove it and as you
can see we still have it here on the right side so now what we're going to do we're going to go and color the
container so make sure to select the container over here let's go to the layout and then let's go to the Border
make it a line and then let's choose any color for example the purple one and as well let's go and put a background for
it maybe the purple as well so with that we can see that we have here a container a floating container on the right side
and the next step we're going to go and give it a name so we have it here in the item hierarchy let's go to the vertical
container click on it and then let's give it the name of filter so container filter all right so now we have our
first container let's go back and start building the main container for the dashboards so let's go back to the
dashboards and let's grab a vertical container for the main one so let's drop it here in the middle and now we're
going to go and add the coloring for it so let's go to the layouts let's go to the borders and let's have it as an
orange and as well I would like to add a background color for that so let's take the orange as well so with that we have
our main container on the left side you can see we have the Tilt and then the vertical container let's go and rename
it I'm just going to make it a little bit bigger over here so we're going to say you are the main container all right
so now the next with does we're going to go and add blanks in order to have placeholder for the elements inside this
container so let's just go and add one and then let's go with the first container inside the main one we have
the horizontal container for the title so let's take a horizontal container just drag and drop it here below make
sure that is inside the main container so do that carefully all right so we have our horizontal container let's go
and put some coloring on it layout border and let's make it blue and as well for the background let's have it as
well as blue so now of course let's go and check stuff over here so we have the vertical container we have our blank on
top and then we have the horizontal container let's go and rename it you are the container
for the title all right so now let's go inside it and put some content so what we have we have a text so let's drag and
drop it inside the horizontal container so let's say you are the sales dashboard we will format everything later so
that's it let's go and hit okay so now as you can see our container going to be very small let's make it a little bit
bigger and now we have to go and add the two buttons so let's go with the navigations make sure to add it inside
to the right side right because it is horizontal container so let's go and drop it and we need another one so let's
go and drop it as well to the right side or in the middle doesn't matter all right so now let's go quickly and check
the layout to make sure that everything is fine so inside the title we have a text and then two buttons great so now
let's go to the next content we're going to have another container for the qpi so let's go again to the dashboard and take
horizontal container and make sure to put it beneath the first container so let's drop it over here and now make
sure to click it and let's go and add the coloring to it so it's going to be line and as well blue the background is
going to be as well blue all right so now the next step we're going to go and add again a name for it so let's go
inside you are the container for the qbis okay so now let's go and add some content inside it using the blanks so
the first blank make sure to drop it in the second horizontal container and now we have it very small so let's go and
extend it and then let's grab another one make sure to put it on the right side so now with that we have two planks
and let's go and grab the third one to the right side so with that we have our three Place holders for the qbi and
again I always go back to the layout to check that everything is fine so as you can see those three planks are inside
the qbi so everything is clean let's go back now to the dashboard and add the last container for the charts so we're
going to go and grab again a horizontal container drop it below the middle one and let's go and add some coloring to it
so let's go to the layout we add some border blue and as well a background for that now let's go and give it a name so
you are the container for the charts okay so now let's go and add some planks in order to
have some content inside it so the first plank inside it and now we have it very small so let's extend it and the second
plank to the right side so now we have two places for our charts let's go to the layout and check as you can see we
have the two planks underneath the charts all right so with that we we have the three containers for our content
let's go and remove the first plank since we don't need it anymore so we have it in the top over here let's go
and drop it so with this we have built the foundation the structure of our dashboard so we have the container for
the title we have the 3 qbis and then place for the two charts and as well we have here on the right side our floating
container for the filters all right so as you can see it's really easy just do it slowly step by step check everything
give it a name don't rush it all right so that's all for this step now finally let's go to the step where we're going
to put everything together and put the content inside our dashboard okay so now let's go and put all our content inside
our dashboards don't worry about the filters we're going to do it at the end so let's start with the qbis right so
we're going to take the first one the qbi of sales make sure to put it near the planks and then let's go and grab
the second one next to it and the quantity as well next to it so let's go to the layout to check everything so as
you can see we have this container for the qpi and in inside it we have our three kbis now we don't need any more of
the planks let's go and start deleting them all right so now let's keep going and put the other charts inside our
dashboards let's take the subcategory make sure to be inside the third horizontal container so let's drop it
over here and then the last chart is going to be the weekly Trend let's drop it side by side over here so let's go to
the layouts and check so as you can see the horizontal container for the charts has our two charts and the two blanks
let's go and remove the planks great so now you can check again our structure in the item hierarchy to
see that everything should be looking like this so we have the main container where we have inside it three horizontal
containers the title should has the tital and the two buttons and then the qbi should has the three qbi and the
chart should has the two charts so if you have it like this that means everything so far is clean and we are in
a good way all right guys so that's it for this step we have the main content inside our dashboard and it was very
easy and fast so now in The Next Step things going to get interesting where we can start formatting coloring
positioning the stuff in order to have a clean and professional dashboard okay so now let's start
formatting our dashboard the first step is that we're going to go and make sure that our content is distributed evenly
in each container so let's go to The qpi Container over here make sure to select it and let's go to this small arrow and
let's click on distribute contents evenly all right so let's move to the next one as you can see those two charts
are not distributed evenly so let's select the container and let's go to the more options and distribute it evenly so
with that we're going to get a fair alignment for all charts we will not do that for the first container because the
title should be bigger than the navigation buttons okay so now let's start from top to bottom let's start
with the title so let's go inside the title over here and start formatting it so we're going to call it sales
dashboard and then let's have a pipeline and then let's have the year the current year
that the user selects so what we're going to do we're going to go to inserts and let's add our parameter so now let's
go and change the font sides let's select everything and make it for example 24 and now let's go and change
the coloring so let's go to the colors and pick our coloring right so let's go and pick the dark one and for the year
let's have it as Tableau medium and pick the other color that greas all right so with us we have our title hit okay and
check how it looks like yeah I think it looks fine let's make it a little bit smaller okay so that's all for those two
containers now let's go and check the buttons we have to make sure that those buttons has exactly the same sizing
which is really hard to configure so what we're going to do we're going to go and grab a mini horizontal container in
order to put those two buttoms inside it and distribute it evenly so with that we're going to get a perfect sizing
let's go to the dashboards and let's get a horizontal container make sure to drop it to the right side so with that we
have a small container let's make it a little bit bigger to see it I'm just going to remove stuff and now we're
going to go and move those buttons inside it so let's drop it inside it and as well pick the second one and put it
to the right side so now of course let's go quickly and check that everything is fine so now let me close all those stuff
we are at the title we have our title and then we have the mini horizontal container and inside it we have the two
buttons all right great so now let's go and make everything distributed evenly so let's let's go to the horizontal
container let me just quickly give it a name so you are the horizontal container for the buttons okay perfect and let's
go and distribute this container evenly so make sure to select the horizontal container and let's go to the options
and distribute content evenly so now as you can see those two buttons going to get exactly the same size so as I'm
reducing or making it bigger both of them going to get exactly the same size so let's just make it a little bit
smaller and now let's go and change the design of those buttons so click on the first one let's edit the button okay so
now let's say the first button going to be for the sales dashboard so let's go and select it it's going to be the sales
dashboards and and now let's go and give it a title or a name it's going to be sales dashboards and now let's go and
format the fonts it's going to be white so everything is fine let's go to the background let's pick our colors so
let's go to more colors and pick our blue okay so what else let's go again to the fonts and make it instead of 12
let's make it like around 10 all right so that's it let's go and hit okay now with that we have configured the first
button let's go to the second one let's go and edit the button and now since we still don't have this customer dashboard
we cannot go and select it but I still I want to format it so let's go to the font make it 10 and this time I'm going
to make it black and let's give it a title it's going to be the customer dashboard and for the background it's
going to be the white and let's go and add a board order for it so it's going to be the line something like this maybe
and then a gray okay so now let's add a toll tip it's going to be go to customer dashboard okay so let's check that okay
so as you can see we got the second btom it's still gray because we haven't select any dashboards so once we have a
dashboards it's going to be white so now let's go and make it a little bit bigger so select the container just make it a
little bit bigger okay so that's it we will visit it later once we have the customer dashboard all right so that's
all for now for the first container what I'm going to do I'm just going to go and remove the background coloring of the
container so let's select the title let's remove the border and as well the background color so let's have it as
none all right so now let's move to the next one we have our QB eyes so the first thing that I'm going to do I'm
just going to make it a little bit bigger maybe to the middle somewhere like this and then what we're going to
do we're going to go and add the background color so as you can see we have here a white color but here we
don't have any coloring for the title so in order to do that let's Click on each one of them and then we go to the
background let's make it white then to the next one white and the third one it's going to be as well white okay so
now we have like a big card or big qpi for all those informations for each one of them all right so now the next step
is that we're going to go and remove the coloring of this container so let's remove the border and remove as well the
background all right so now let's start with the first container over here what I'm going to do I will just as well add
a background color for those two charts going to be the white and now what we going to do in order to configure those
stuff we still have this container which is really bothering me so let's go and select the whole container let's move it
to the top over here and then let's go to more options and we're going to select this one add show hidden button
so let's click on that so once you do that you will get like small icon in order to show and hide the whole
container so what we're going to do we're going to hide it so click again on the options and hide it so now the whole
container is inside this icon I will just place it over here in order to work in our charts all right so now the next
that I would like to go in each charts and make sure that it fits the entire view so let's go to the first one you
can check it from here you can see it is entire view the next one as well third one and as you can see it's standard so
let's go and switch it to entire View and the same thing for the weekly Trends it is entire view so with that we make
sure that Tableau is using the whole space and we can make this one little bit bigger and as well as you can see we
still have little bit space so let's go to the middle over here and make the QB eyes a little bit bigger in order to use
the whole white space all right so with that we have a perfect positioning for each chart I'm really happy with that
all right so now the next step with that we're going to go and add some nice Legends to our charts so now for the
first charts we have to give the following information for the users so the dark gray going to be the current
here and the background color is the previous year so now I'm going to go and customize in nice Legends I will not use
the one that's from Tableau because I want to customize it so for that we're going to go and create quickly a chart
for the legend so let's create a new sheet and all what we need is the text of the current year and the previous
year so we have it as calculated field so let's move the current year to the text and as well the previous year to
the text so now let's go and customize those informations okay so now we're going to start on the left side so let's
make the alignment to the left I'm going to start with the first information the current year so we're going to say the
current year sales let's make the S bigger and let's go and change the fonts to something like maybe a medium and as
well the coloring it should follow the pattern in the chart so the current year of sales it was a dark one so let's go
and pick our dark color and for the previous year it was the light color so let's do that and let's make the current
here as bold okay so let's go and test it let's go and apply now probably going to show
it as hashes because the size is really small so let's go and hit okay and we can go to the standards and make it
entire view so now we can see it over here 2023 sales versus 2022 sales so now as you can see it the current year
versus the previous year okay one thing that I'm not really happy about it let's go inside it and remove the Bold okay
and let's give it a name so this going to be the legend of subcategory charts so that's it now let's go to the back to
the dashboard in order to use it now I would like to have the legend between the title and the charts we cannot do
that so instead of that we're going to go and make an extra container for those three informations so we have a title a
legend and then the charts so as I said again we cannot plan everything at the starts as you are building the dashboard
you will understand the needs and you will adjust stuff so now what we're going to do instead of having this
charts we're going to have a vertical container inside the horizontal container so now let's grab a vertical
container and the B thing to do it here in the middle and what we're going to do we're going to grab the chart and put it
inside this container so make sure to drop it inside this container and of course let's go quickly and check the
layout whether everything is fine so it's inside the Tilted main charts so now instead of the first charts we have
a vertical container so let's go and give it a name quickly so you are the container of let's say chart one and
inside it you can see we have our charts so now our vertical container we going to start with a title so let's go and
grab a title or a text on top and now we're going to give it the name sales and profit by subcategory so now let's
go and formatt it you're going to be table Medium as a font and then the size going to be 14 and the coloring going to
be the dark one so let's go and select that okay so that's it hit okay all right so that means we don't need the
title of our chart right click on it and hide the title great so now finally we can go and grab the Legends but now in
this chart I would like to have as well a legend on the right side for the profit so that means we have a legend on
the left and Legend on the right and in order to do that we can to have another container in order to put those two
legends Side by Sid we cannot do it currently because we have a vertical container so let's go and grab a
horizontal container and just put it in the middle over here they just resize it so make sure to select the container and
let's put the first Legends inside it okay so now we have a title for this small Legend let's go and hide it great
so now let's go and make everything smaller all right so with that we have a really nice Legends where we are telling
the users we are comparing the sales of 2023 with 202 too all right so now let's go and configure the right Legend we
have to tell the users this is profit informations and the blue color indicate for profits the orange going to indicate
for a loss so for this Legend I'm just going to use the text object so let's drag the text and make sure to put it
inside this mini container to the right side so first let's indicate the current here let's go to insert and have the
parameter because here we have the profit only for the current year so next we're going to say okay a circle this
going to be profits and another Circle this going to be a loss okay so now let's go and make sure that the font is
a tableau medium it's going to be a nine and let's go and make sure that the coloring that is used is the dark one
but now let's go and change the coloring of the circles so the first one going to be the blue and the loss is
orange so our orange okay so now let's go and hit okay and test it all right so now as you can see we have it really big
let's go and make it smaller all right so with this Legend the users can to see immediately that we are talking about
2023 the blue one going to be the profits and the losses going to be the orange all right so now I'm really happy
with the first chart of course we still have the coloring of the background let's go to the layout and make sure
that everything is correct of the containers so let's go to the chart one as you can see we have a vertical
container we have a text and then we have a horizontal container for both of the Legends so inside it you can see we
have the chart for the first Legends and the text of the seconds and then below that we have our charts so if you have
it like this you are following me correctly now what we're going to do we're going
to go and give a background color for the whole container for the first charts so let's go to the background over here
and make it as a white so with that the user is going to get the feeling that everything is in one unit in one chart
all right so this is for the first chart let's go and do the same stuff for the right one so in order to do that let's
go and grab a vertical container and let's grab it to the middle over here so now with that we have our container
let's go and grab our chart and put it in the container the new one that we have created so now with that we have
our chart inside the new container let's go and check the layout to make sure that everything is fine so let's go to
the charts we have chart one and the new one going to be for the chart two let's go and rename it so you are the
container for chart to okay and inside it we have our chart so perfect so that means we're going to
go and grab a text object and drop it on top of our chart inside the new container so let's call it sales and Pro
profits Trends over time now we're going to go and start formatting it so let's go and grab the
Tableau medium and as well it's going to be 14 let's go and pick our color it's going to be the dark one so with that
we're going to get exactly the same title as the left one okay so the next let's go and hide the old title from the
charts and next we're going to go and put our Legend so it's going to be a TT objects let's put it in the middle
between the title and the charts so now what we're going to say in the Legends let's enter a parameter in order to show
the year and after that we're going to have a circle and we're going to say this is the above and another one is
going to be below so now with that we going to indicate whether the line is above the average or below the average
and we are using the coloring so the above going to be the blue one let's go and choose that and Below going to be
the orange our orange color now what we can to do we can to make sure that we are following the same font so it's
going to be the tblo medium and it is a nine all right so that's all let's go and hit okay I think we missed out the
coloring of the 2023 let's go inside it and make sure to choose the dark color for it all right let's hit okay so now
we got a quick explanation about the coloring inside our chart on the right side so now what we're going to do we're
going to go and select the whole container and we're going to change the background color to white in order to
have this one unit feeling in the chart so let's go to layout and let's go to the background and choose the white
color all right so with the that you are done with the container of charts and what we going to do we're going to go
and select the whole container and remove the border and as well the background color okay so now by looking
to our charts inside our dashboards we still are missing some information about the qbis we have to present here a
Legends explaining those two points and as well the coloring of those two lines so we will have something very similar
to this Legends where we're going to say 2023 versus 2022 in order to explain those two lines and then we can explain
those two circles so in order to create the Legends what we're going to do we're going to go to the legend of subcategory
and let's go and duplicate it and let's give it a name you're going to be the legend of qbi let's just move the
dashboard to the end in order to have all the sheets on the left side and let's go to the legend of qbi and start
formatting it so now since we have different qbis not only the sales I'm going to go and remove the sales words
in our text so let's go to the text to the three points and then let's go and remove the sales and let's have only the
years and then let's go and add our Circle and we're going to say highest month and another Circle for the lowest
month now as usual we're going to go and start formatting those informations it's going to be W medium 9 so everything is
fine let's go and change the color of those circles so the highest going to be the blue and the low is going to be the
orange so let's go and hit our okay okay and check the results looks nice right but I think here I have an extra space
so let's go to the text again and let's have only one space all right let's go and hit okay and now let's go and use it
inside our dashboards so what we going to do we're going to go to the dashboard over here let's grab the qbi The Legend
qbi and let's drop it just below the title so we're going to have it between two horizontal containers so let's drop
it first and then next we're going to go and remove the title so let's go and hide it so now it's really small between
those two containers what I'm going to do in order to select it let's go to the item hierarchy and
now we can check and see we have the container for the title the container for the qbis and in the middle we have
our charts all right so now maybe let's go and make the title it's just a little bit
smaller like this and let's go to the legend qbi and like drag it little bit below all right so now looks fine and we
have an explanation for the three qbis all right so with that we have everything ready inside our main
container what is missing of course is the hidden container where we have the filters but I will leave that until the
end so now what we're going to do we're going to go to the main container let's select it and remove the border and as
well the background so let's have none all right so now the final touch the last step of formatting these dashboards
we're going to go and add spaces in this dashboard between the charts adding spaces between the charts going to have
a huge effect on the user experience for your dashboards and as you can see those two charts are really near to each
others like they are not able to breathe right so adding space between those two charts will not only add a balance
between the items but also it's going to make it easier to read for the users so now let's go and start adding those
stuff the first thing that we're going to do is that we're going to change the background color of the whole dashboard
so in order to do that let's go to the main menu over here to the dashboard and then let's go to the format option and
here the default going to be white let's go and move it to the lightest gray so let's select that so now with that we
are separating the charts from the background and we can see immediately the spacing between the charts so now if
you look to the three qbis you can see we have a minimum space between them but between those two charts there is no
space at all so now let's go and fix the spacing from top to bottom first I would like to have the background color of
this Legend to be a gray so in order to do that let's go to the sheet so I'm just going to switch to the sheet and
then let's go to the format but if you don't have it open just right click on that wi space go to format and let's go
to shading so now we can go and color the background of the worksheet so let's go and say none all right so now let's
go back to our dashboard and as you can see for the legend over here we don't have a coloring we need a background
color of white only for the charts all right so now let's start working on those three qbis in order to increase
the spaces between them so in order to do that let's go and select the first one let's close the formats and let's
stay at the layout so now here if you go to those two options we have the outer padding and the inner inner padding the
outer is the space between the objects and the inner is the space inside the chart itself so now what do we need we
need to increase the spacing between those three qbis and as well the spacing between the qpi and the charts all right
so now let's go and start with the outer badding let's click on it and now here as you are increasing the numbers as you
can see the batting the spaces between this charts and the neighbor charts going to be increased and as you can see
it's going to increase for top right bottom left so as you can see everything is connected together if you change
something here it's going to change for all values and that because all sides should be equal and here it's very
important to understand that you have to make a decision about the spacing between your charts and you have to
commit to your decision for the whole dashboard this is really important otherwise the dashboard going to be ugly
so now we're going to go with the value 20 for all the charts inside these dashboards so now let me show you how we
can do that let's go and make everything to 10 and now what we are doing this chart is taking a 10 on the Left Right
top button and our goal is to have a 20 so if this chart on the right side is taking a 10 and the neighbor qbi is
taking from the left side as well 10 then we will have a 20 so that means in order to have a 20 between all our
charts each one of them should has a 10 but now I care only for the spaces between the charts and not the legend
over here so what we going to do we're going to go to the outer Bing over here and then let's remove all sides are
equal and from the top I really don't care so let's make it as a zero so now our chart is not taking any spaces to
the the top we are taking only space to the right bottom and left so now let's go and do exactly the same for each qbi
so let's go to the profits go to the padding we have to have it here as a 10 and now let's go and disable all sides
equals and we don't need any spaces to the top all right so let's move to the next one the same stuff make it in and
let's remove the tub so now we can see clearly there is a space between all those three qbis and this space is equal
to 20 so now let's go and add spaces to the two charts over here so make sure to select the whole container and now the
same thing we're going to go to the padding over here and now we're going to make it a 10 this time we care about the
top to be 10 in order to have a 20 between this charts and the qpi above all right so that's all for this charts
let's go to the next one and do the same so make sure to select the whole container and let's move it to 10 all
right perfect let's go and deselect as you can see the whole look and feeling of our dashboard look more professional
and easier to read and this is exactly what why we add spacing between our charts okay guys now not only the
spacing between the chart is important but as well the inner spacing the inner bading is important between the content
and the border of the content and as well adding spacing inside the container or the contents going to make things
look more B better so for example let's go to this qpi over here you can see the total of sales is very close to the
border right so now what we're going to do we're going to go to the inner Bing and now let's go and increase the size
little bit and see how things looks like let's make it maybe seven so now as you can see as I'm increasing those numbers
the content are getting pressed and move away from the border so if you increase it for example like to 20 and as you can
see now we have a lot of spaces between the title and the border of the content so now let's go and move it to seven and
we will go and do the same for all other qbi so let's go to the right one and we're going to make it seven and to the
third one let's go and make it seven so as you can see moving the content away from the border a little bit gonna make
everything breathe better let's go and do the same for all other charts so I'm going to go over here to the whole
container let's add a seven as well over here and add a seven all right so that's all with that we are done formatting our
dashboard the next step with that we're going to go and start working on the filters and the
interactivity and now let's check quickly what was the requirements we have to allow the users to filter the
data by the product informations like category and subcategory and as well by the location informations like the
region states and city and we have another requirement about interactivity and filtering it says we have to allow
the users to use the chart and the visuals as a filter all right so now let's go and add the requested filters
we didn't add any filters inside our worksheet so let's go to any of those worksheets for example the qbi sales and
let's start adding the filters so the first one what about the product informations so let's go and get the
category show fil filter then let's go to the location information let's add the country all right so those are the
filters that are requested from the users The Next Step that we're going to go and apply them for all worksheets so
since all those filters are relevant for all our charts so let's go to the first one right click on it and apply to
worksheets and then let's say all using this data source so let's go and select that and as you can see now we get small
icon indicate that all worksheets using this data source can have this filter the category let's go and do the same
for all our faers so using data source State as well and the city so now we can go and test that if you go to any other
sheets we should see all those filters so as you can see all our worksheets has those five filters all right so now the
next step we're going to go back to our dashboard and start adding those filters so let's go to the sales dashboard and
you know that for the filters we have an extra container for that it is currently hidden so as you can see the first
container here the vertical container and it is hidden because we are using a button so let's go and show it in order
to do that we're going to go to this small icon and then right click on it and then let's say show so once we do
that we will get our mini container for the filters so now let's go and start building this filter container so I'm
just going to move it to the right side over here make it to the whole side and then little bit
wider all right so now as you can see we have got a lot of information that we don't need we got it automatically from
the charts we have our own own Legends so let's go and start removing those stuff we don't need
anything but I'm just going to leave the parameter so let's just leave the select here and now we have to go and start
adding the filters so since our filters are everywhere in each chart doesn't matter which one you can select let's go
with the first one over here let's go to the arrow and then here we have the option of filters and let's make sure
that we are selecting the filters that we need so let's start with the category and let's go add the second one one it's
going to be the subcategory so it's over here and then let's have the location informations it's going to start with
the region and then the next one let's go to filters we're going to have the stage and the last one going to be the
city so filters and with sity we have it over here so as you can see as we are adding
filters in our dashboards it's going to be automatically added to this container all right so now the next step that
we're going to go and start changing the structure of those filters and we will have a drop down menu using multiple
values so let's go to the category over here let's go to this arrow and make sure to select multiple values drop down
so we're going to do it for all those filters to the region as well
State and the city so this is how I usually go with the filters in order to have more space but you have to discuss
it with the users maybe some users can to say okay one of those filters are really important and they want it as a
list so of course if it has locality then it's no problem all right so that's all the required filter filters for this
dashboard let's go to the next step where we're going to start formatting coloring and as well cleaning up this
container okay so now the first step does we're going to go and change the color of the background so select the
container let's go to the layout and we don't need any borders but we want to change the background color so let's go
and select our color but this time we're going to go and make it really dark so let's make it darker okay like this
let's go and hit okay all right so now the next step we does we're going to go and start grouping up those filters into
groups so the first two the category and subcategories those are informations about the product and the region state
city they are about the location so let's go and give this informations to the users so what I'm going to do let's
go to the dashboard grab a text and let's just put it before the category so the first one going to be about the
product so let's write the following product and then after that two minuses let's go and make everything bigger so
let's check the 11 let's have it in the middle and let's go and change the font to something like light and as well as
let's go to the coloring and pick our color but let's make it a little bit lighter something like this maybe all
right let's go and it okay all right so now one more thing what we can do we can add spaces between each character and
just in order to make it like a title so let's adjust spaces okay so let's go with that let's H okay so that we got
like a group name for the next two filters let's go and do the same for the location so we're going to go and grab a
text the region over here and we're going to do the same so Loc ation we will do exactly the same
formats to the middle and as well let's pick the Tableau light and now let's go and add the spaces between the
characters all right and let's do the coloring if you go to the color over here you will get from the history the
last use color so with that we get exactly the same coloring for the product so that's all let's go and hit
okay nice so with that we have grouped up our filters but let's go and add more spacing between those two groups so what
we're going to do we're going to go and grab a blank and let's just do it before the location all right so now
with this plank you can decide on the size of the space between those two groups so let's go with something like
this and let's have as well a blank between the year and the product so let's grab a blank over here and let's
just put it here so that we have like an extra space between them and you can control the height of those two blanks
by going to the layout over here if you select it you can see the heights so as you can see both of those are almost
identical so everything is fine so now we're going to go and add a title on the top says those are filters so what we're
going to do we're going to go and grab a text from the dashboard over here let's just put it at the top and let's call it
filters as well you going to be lights let's make it bold and let's make this title as 14 and we can go over here and
add spaces between those letters and we can make this one as a white all right let's make it as well to
the middle let's go and hit okay and as well we can go and control the spacing by adding a plank on top of it so let's
go and add plank at the start so with that we control the space between the border and this title so that's it I'm
really happy how it looks like let's go to the next step where we're going to go and start positioning this container but
now in order to place it in the correct place I need to understand the border of the main container so let's go back to
the layout and select the main container again I'm just going to add a border to it in order to see it so with that we
can see this is the border of our dashboard and let's go and position this container exactly on the borders okay so
now how we're going to do that let's go to the positions over here and make the Y to zero so let's change it to zero and
now with that we start exactly on the top but for the bottom and the right we have to do it manually so let's start
moving stuff exactly on top of the borders all right perfect so we have it exactly on the place where we need it
what I'm going to do I'm just going to go and make it a little bit smaller and now the next step we're going to go and
start adding spaces inside the container itself just to make it look professional and not everything on the edges so let's
go and give it some spacing so what we're going to do we're going to click on the whole container again and let's
go and add some inner padding so let's go over here and I would say let's just move it and see how things looks like
maybe let's go with the 10 so now as you can see those boxes does not start immediately on the border and it's going
to be easier for the users to select all right so now we are done cleaning formatting our container for the filters
we can go and start testing right so let's go for the year and change this year to 2022 as you can see all numbers
the change which is perfect let's move it back to 2023 let's go and pick another category so let's have only the
furniture and as you can see the dashboard is reacting which is really great and now of course we can go and
remove the all over here because it's not really needed we have really low cardinality in this filter so let's go
over here and then let's go to customize and remove the show all values okay so now if you go again here you will not
find the all for the low cardinality Dimensions like this we don't need it for high cardinality Dimensions like for
example the subcategory here it really makes sense to select everything so that's why I'm going to go and leave it
over here let's go to the next one to the region we have here only four values let's go and remove the all and as well
we can start testing so as you can see everything is working all right so that's all about the requirement of
having filters for the users for the product and the locations and we are done let's go now and hide this
container don't worry about the icon we're going to change that in the last step of the dashboard in the Final Touch
so let's go over here and hide it so that the whole container did disappear let's talk about the second requirement
so the requirement says to have interactive charts that means if you click on somewhere on the charts it's
going to be used as a filter for the other charts so for example if I go and click over here in this subcategory it
should go and filter the other charts so in order to do that it's really easy just click on the chart and select this
small icon over here as use as filter so once you select that it's going to be filled and if you go and click around
you can see the other charts going to be filtered so we are now adding Dynamic and interactivity to our dashboards
let's go and do the same for the other charts so let's fill it and use it as a filter I think for the qpi it doesn't
make sense to use it as a filter so make sure to discuss that with the users whether they want their kpis to be used
as a filter so for now I'm just going to leave it as it is and we can go and use those two charts in order to filter the
data so for example if I go over here and select all those data points you can see the data is filtered in the other
charts all right so as you can see it's really easy and with that we have fulfilled this requirement and with that
we have added the filters and the interactivity aspect to our dashboard all right so now finally we
are at the last step of the dashboards where we going to have the Final Touch by adding for example icons and if you
downloaded the project and I hope you have downloaded from the description link what you're going to do we're going
to go to the project over here and you can see we have a folder inside the project called icons so let's go inside
and with that we have around five icons that we can add to our dashboard so let's go and add them okay so now first
we're going to start with the icon of the filter so click on that and let's go to more options and let's go and edit
the button and here in this window we can configure two options when the item is shown and when the item is hidden so
now let's start with the first one as the item is hidden that means the whole container is hidden as the current
situation so let's go and choose an image for that or an icon let's go to our project and we will use this icon in
order to indicate for the users if you click here you will find filters so let's go and select like that all right
so that's all for now now we're going to go to the opposite scenario where we can see the container and we want to
minimize it or close it so here we have another icon let's go and choose the image of closing this one okay okay so
that's all for now let's go and hit okay and with that you can see now our icons let's just make it bigger in order to
see it and let's go in the presentation models in order to understand how this going to work so let's go and present
and as you can see we have a big icon here if we click on that our container going to appear and then it's going to
switch immediately to the second icon icon and if you click in the second icon the container can disappear all right so
this is how it works let's hit escape and go back to our developer modos so now let's go back to the button and edit
it and here we have to give the users a tool tip if they Mouse hover so let's go and say something like show dashboard
filters if the container is hidden in order to show the container and let's switch to the other one and let's say
close dashboard filters so let's go and hit okay and if you Mouse over on the filter you will see this small tool tip
all right so that's all for now let's just move it to the right side and we will configure all those stuff later
once we add the logo to our dashboard so now we would like to place the logo just before the title in order to do that so
let's go to the dashboard and here we have an object called image so drag and drop it just before the title over here
inside the container and now we have to go and choose the image so our logo going to be this one let's go and hit
okay and then let's go and choose those two options to fit just in the center so that's it let's go and hit okay and with
that as you can see we have a nice logo at the start but let's go and just make it bigger so I'm just going to go and
select the whole container just make more space for it and maybe just move the tight a little bit to the left side
squeeze it all right so it looks nice right all right so now before we continue let's go and check the layout
whether everything is fine just going to make it a little bit bigger over here so here we have the title container and
inside it we have the logo the title and then we have the buttons over here so so far everything looks good but one thing
that I have noticed that the legend here is little bit shifted to the left it does not Ally with the QB eyes so I'm
going to show you now a trick in order to test that if you go and change it to floating and let's get a blank and let's
go and format this plank to have for example a border and then let's have any background color for that all right so
now we're going to go and use this in order to teste that everything aligned so what we're going to do we're going to
just move it over here exactly on the border and as you can see the two is outside so that means
we have to go and adjust the badding of our Legend So select that and now let's go to the outer badding and let's remove
all sides are equal and start working on the left one so let's go and start increasing so with that the two is
inside and everything should be fine so if I go and deselect remove my test from here and as you can see everything looks
really clean all right so this is how I usually test stuff if I'm not sure on the visual so let's go and remove it now
great we have the logo we have the icon for the filters so we would like to have the sales dashboard and the customer
dashboard as an icons we don't want them as a buttons so in order to change that what we're going to do we're going to go
to the buttons over here let's go and edit it and now instead of having a text we're going to have an image so let's go
and choose another image and this can be for the sales so let's select that and we have the tool tip from before let's
go to the customers and do the same and we have for the customers another icon it is the one let's go and hit okay and
we have a tool tip so everything is fine let's go and hit okay so now as you can see we have now three icons one for the
sales one for the customers and one for the filters all right so now what we're going to do we're going to go and add
all those icons in one container all right so now currently we have one floating icon and two others inside
container so let's go and change this one from floating to tilt in order to do that let's go to the options and let's
remove floating from here so now it is somewhere inside our dashboard let's go and place it next to the others so make
sure inside the container all right so with that we have everything in one container the next step with that I'm
going to go and change this container to a floating container because I wanted to place it freely where I want so in order
to do that make sure to select this small container over here let's go to more options and change it to floting
and next I'm just going to move it exactly to the border to make sure that we have it in the correct place so now
we have the Border exactly on the filter I think it looks really nice let's move it a little bit up okay all right so now
everything looks really perfect the icon over here is grayed out because we haven't select what can happen if the
users click on this icon because we still don't have the customer dashboard don't worry about it we're can to have
it later all right so now the last touch we're going to go and remove the whole border of this container so let's go and
remove it all right so now we are almost there what I'm going to do now I'm going to go and test the container inside the
filter to see everything is working so let's go and show the filter and now let's go and adjust few stuff about this
container so double click on the container make sure everything is inside and now in order to control the spacing
we have added before a plank at a starts remember so if you go to the plank inside this container the first one we
can go and push the content down maybe something like this and with that this container is as well clean let's go and
hide it and I think we are done so let's go and test the final result by going to the presentation modus let's go and test
this container again and I think everything is placed perfectly and really we have a nice dashboard all
right so guys we are done with the sales dashboards from the requ M until a very professional dashboard so now next we're
going to go and do all those stuff again for the customer dashboard so now here is your task to pause the video or come
back later to the course in order to work on the customer dashboard and once you are done we can continue the course
in order to show you how I did repair it so now go through all the steps starting by analyzing the requirements and ending
up by having a customer dashboard so now since we have those two dashboards in one project I'm going to say let's go
and copy a lot of stuff from the same sales dashboard and reuse it in the customer dashboard so see you
soon all right so now I hope you are done building the customer dashboard now I'm going to show you my version how I
did implement it so now let's have a quick overview on the requirements let's start with the key requirements we have
here the same stuff it says that we have to show qbis where the qbi should display the total number of customers
sales per customers and as well the total number of orders for the current year and the previous year and the next
require is about the trend we have to present the data on a monthly basis where we have to compare the current and
previous years and as well we have to identify or to highlight the highest and lowest values so those two requirements
are exactly like the sales requirements but with different measures so for the chart type here we're going to go
exactly like the sales dashboards where we going to have bands and as well spark lines with small circles all right
moving on to the third requirement we have the customer distribution by number of orders so here we have to present the
distribution of customers based on the number of orders so here we are talking about data distribution and for that we
have a perfect chart we have the histogram okay so now for the last requirement we have to show the top 10
customers by profit so here we have to show the top 10 customers with the highest profit and as well they need a
lot of informations like the rank number of orders current sales current profits and the last order dates so here in this
requirement we have to present a lot of details about the 10 customers and for this I have decided to go with a symbol
table where we're going to have rows and columns all right so this is about analyzing the requirements and deciding
on the chart type for the next St we're going to talk about the mockup and the coloring we're going to use exactly the
same stuff like in the sales dashboard and that's because the two dashboards are in the same project and it makes no
sense to create each time for a new dashboard a new mockup so here we have to follow one mockup for all our
dashboards in order to have the same look and feeling of our dashboards inside this project so as you can see
things goes easier for the Nyx dashboards now we can go and start implementing the charts in Tableau all
right so now for the first charts we have the three qbis customers sales per customers and orders they are the usual
stuff like before it's just copy and paste and switching the measures and of course if you are interested in how I
implement it I'm going to leave the file as well in the project or you can go to my public profile and download it from
there maybe one interesting thing to show you how did I calculate the sales per customers so let's go over here and
since now we have a lot of fields we can go and search for customer in order to check the calculated Fields so first we
have to decide which customers did order for the current year and which one did order for the previous year so it's
really simple if we go over here to the current year customers and let's go and edit you can see over here we have the
same condition if the year is equal to selected Year from the parameter then show the customer ID otherwise it's null
with the previous year we're going to have exactly the same but subtracting one year so this is the first step then
the next step we're going to go and calculate the current year sales per customer so we have it over here let's
go and check inside it so for that we have the following calculation we're going to divide the current year for the
sales by the count of the distin value of the customers and with that you're going to get the average sales per
customer so we will do the same stuff as well for the previous year and the rest is going to be as usual so finding the
differences and finding the min max values so that's it for the sales per customers now let's go and start
implementing the first chart using the histogram in order to show the data distributions for the customers so let's
go and create a new sheet and we're going to call it customer distribution all right so now since we
are talking about two measures the count of customers and the count of orders we have to go and use the LOD expressions
in order to generate the pens and I explain that in details in the LOD expressions using the fixed so make sure
to check that in order to understand the LOD expression that we're going to use now and for that we're going to go and
convert the number of orders into pens using calculated field so in order to do that let's go and create let me just
remove the search create a new calculator field so here we want to find for each customers how many orders they
placed and of course we are talking for the current year so for that we're going to go and use the function fixed from
the LOD expressions and then we have to define the dimension it going to be the current here for the customers so here
we have all the customers that did order in the current year then after that we have to do the aggregation and it's
going to be the number of orders so we're going to go and count distinct as well the current here for the orders the
current here for the orders is like the customers all the orders that are placed in this year all right so that's all
let's go and close the fixed over here all right so again what we are doing over here for each customers we are
going to find the number of orders that are placed for the current year all right so now let's go and hit okay and
now we have it over here as continuous measure let's go and change it to Dimension so right click on it and make
it a dimension because pins in the histograms are usually discrete values so now what we're going to do we're
going to go and test the values let's drag and drop it to the view okay so with that we got our pen for the
histogram but I would like and go and test those data so in order to do that let's go and create a new sheet let's
call it test histogram so what we're going to do we're going to go and check our customers so let's pick the customer
name and now as well let's go and grab the ordered ID over here let's show all the values and as well we need the date
so let's go and pick the order date it is over here in order to see the year and then what we're going to do we're
going to go and check our new calculated field let's drop it over here and then let's go and switch it to a measure and
sum all right I will go and drop it on the labels all right so now let's go and check one of those customers let's focus
on Adam heart right click on it and let's say keep only so now we can go and check all orders of Adam and as you can
see we have a lot of orders in the history and none of them going to be counted inside our calculated field
because we are focusing only on the current year so as you can see we start counting from 2023 and in 2023 we have
five orders 1 2 3 4 5 so as you can see the me is returning a correct value we can go and test the other years for
example let's go and show the parameter and let's go and switch it to 2022 so with that you can see in the 2022 we
have only three orders let's go and switch it to 2021 and we have here only one order so that means our calculated
field is working as ATT tendance and we can use it now for the histogram so this is what I usually do once I create a new
calculated field especially if it is L OD I go and test it so I go and create a simple table in order to see the data
and focus for example on this one customer instead of testing directly in the histogram because it's really hard
in the visuals to test the data all right so now let's go back to our customer distribution and let's get our
bars in order to do that we're going to go over here to the rows let's say count distinct and now we're going to go and
count the customers for the current year so the current year customers let's go and now we have to go and change the
visual to bars since histograms are bars and with us we got our histogram so that's it now next we're going to go and
start formatting our histogram so the first thing as usual we're going to go and remove the lines so let's go and
format let's go to lines let's go to rows and remove the grid all right so that's all for the lines next we're
going to go over here and remove the headers and let's make to those pins and make it more readable so let's go and
format it maybe I'm going to make it bold and change the color all right so now we have the name of the dimension
over here we can go and hide it okay so now let's go and start with the coloring let's hold control and drag the customer
to the colors and of course we're going to go and use our coloring so let's go and edit it
and let's pick the blue one all right so that's it let's hit okay okay next we can go and add some borders to those
parts so let's go to the colors to the borders and make it something like this all right so now the next time I'm going
to go and add some labels so let's get the customers to the labels and I think with that you are done with the
histogram we can go and test it by adding the parameter let's select another year like 2023 and as you can
see everything is reacting and that's it for this requirement now we are showing for the users the distribution of
customers by the number of orders let's go now for the next requirement where we're going to show the top 10 customers
by The Profit all right so now let's go and create a new worksheet let's call it top customers so now we need our
customers to the row and now we're going to show only the top 10 customers by the profit for the current year so let's go
and get our measure it is the current here for the profit let's drop it on the text over here and now next we're going
to go and make the filter in order to show only the top 10 customers so hold control drag and drop the customer name
to the filters and now here we're going to go to the tab of top and then let's switch it to buy field so we have top 10
buy the profits and the aggregation going to be the sum so this is exactly what do we need let's go and hit okay
and with that we're going to get a very simple list of the top 10 customers by The Profit let's go and change the
format in order to see the whole number so let's go and format it where I'm going to go and remove the unit so
remove decimals and let's have the dollar sign at the start all right so now we can see the whole number let's go
and sort the list by the The Profit so in order to do that go to the customer name and then let's go to sorts and
we're going to go to a fields and in order to have a ranking we're going to switch it to sort order by descending
and make sure that we have the field name current year of profit all right so that's all let's close it and as you can
see the first customer on top it's going to be the top customer and now the next step is that we're going to go and add
the rank to this list so in order to do that we're going to use the function index so let's go to the roads over here
and just write index and that's it and then let's go and switch it to discreet and just put it at the front and with
that we have a ranking from 1 to 10 all right so now we're going to go and add additional informations for each
customers like the sales for the current year so let's go to our data Pane and let's grab the current year for sales
drag and drop it on top of those numbers so with that you can see as well the sales for the current year let's just
make it a little bit bigger and now the next information that we're going to go and add is the number of orders for the
current year that is placed from the customers so in order to do that let's go to the measure value over here and
double click on the empty space and write down count distinct in order to count the orders so we're going to go
and type current year of the orders all right so let's H okay and now we're going to see the number of orders that
each customers did place in the current year all right so now the next information that we're going to add is
the last order date did the customer place and now we need the last order date in order to do that right click on
it and let's go to the measures and get the maximum so with that we can see now when was it the last time did our top
customer order from our business all right so with that we got all the informations that we need inside our
chart The Next Step that we're going to go and start formatting it so first we're going to start with the lines and
the grids as usual so right click on it and go to format so now I would like to get rid of this line in the middle
between the measures and the dimensions so let's go to the gridge and let's go as well to the column divider and remove
it so that we don't have the line in between and now the next step with that we're going to go and get rid of the
gray background color so let's go to the shading and then here we're going to go to the row banding and reduce the size
to the minimum so with that as you can see the background color did disappear all right so that's all for the lines
and the grid let's go and start formatting the fonts and the colors of our fonts so first I would like to
format the index over here so let's go to it form matat so let's go and make sure that we are selecting the correct
field so yeah we are selecting it let's go to pan and now let's go to the numbers over here and I would like to
add a prefix so let's remove the decimals by the number custom and add the prefix of hash in order to have like
a ranking so that's it and what else we can add to this ranking is that we can go and add the background color for it
so go to the shading over here and make it very light gray all right so that's all for the ranking let's go to the next
one and start changing the font color so format it and let's go to the font so we can leave it as a tableau book and we
can go and change the color to something like black so that's it let's go to the next one
format and we're going to go over here make it black all right so now moving on to the measures let's go and remove the
unit from the sales so let's go to the sales over here formats and then we're going to go and format it as usual to
the number custom remove the decimal and add a dollar sign all right and for the number of orders we're going to leave it
as it is all right so that's it let's just keep it very simple and with that we have a really nice detailed table to
show the top 10 customers with additional informations all right so with that we are done building all the
charts The Next Step we're going to go and start building the dashboard okay so now in order to create the customer
dashboard we will not create everything from the scratch we're going to go and duplicate the sales dashboard in order
to have the structure so let's go to the sales dashboards right click on it and duplicate so with us we got the two
identical dashboards let's go to the second one and start formatting it first we're going to start with the naming so
it's going to be the customer dashboard and now let's start from top to bottom we're going to start with the title so
let's go over here change it from sales dashboard to customer dashboards so now as you can see creating the second
dashboard going to be very easy Once you have a relas solid structure all right so now next what we have we have the
three charts we're going to go and replace them all with the new ones so the first one is going to be the qbi
customer let's just drop it here at the start and of course T going to go and start adding stuff to our new container
don't worry about it we're going to go and delete it later so let's go and get the next qpi sales per customers and the
orders okay all right and now let's go and hide this container so right click on the icon and let's go and hide it all
right so now we can go and drop those old ke I from these dashboards so let's just remove them and with that we got
our three qbis let's keep moving and add our charts it's going to be the histogram so let's drag and drop it
below the legend over here and we can go and remove the old stuff so the old chart and as well we don't need the
Legends so let's go and drop the whole container for both of the Legends and let's go and change the title to
customer distribution by number of orders
okay so let's hit okay and let's remove the title from the charts okay so as you can see this container keep popping up
because we have a new Legends and new stuff so let's go and hide it again and let's work on the right charts it's
going to be the detail list for the top customers so let's drop it over here and we're going to go and remove the old one
and now we're going to move on to check that everything fits the entire view so let's go check one by one entire view
entire view this one as well everything looks fine let's check the last table okay so it's standard let's go and
switch it to entire view to use the whole Space all right so now we put everything together in one dashboard the
next that we're going to go and start formatting this dashboard and it will not be that bad because we have almost
everything so let's start with the first chart let's make everything with the white background so let's go to layout
and change it to white as well for the next qbi just to make sure that we have done for everyone all right so with that
we got like a card for the whole qbi The Next Step I would say let's go immediately and start working with the
spacing between those charts so let's click on the first one if you remember on the sales dashboards we have agreed
to have a 20 between each charts so let's go to the outer padding and make everything as a 10 but only on the top
we don't need this extra space so let's disable all sides equal and make it zero only for the top and as well we say the
inner padding going to be always seven so let's have it like this and do it for the others so outer is 10 on top is zero
and the inner badding going to be seven and as well for the last one so you are
10 remove it for the top and the inner going to be as well a seven so let's do it like this all right so with that we
are done formatting the three qbis let's move on to the charts so now let's go and select the whole container and as
you can see we have everything done as before so the outer padding is 10 and the inner badding is seven great let's
go and check the right one I think we're going to have it as well correct so as you can see things gets really fast as
you are building the second dashboard using a solid structure all right so now we're going to do one more thing about
the top 10 customers by profit as you can see those header informations or the field name is not really nice so now
we're going to go and remove those informations and we're going to build our own custom field names so let me
show you how we're going to do that let's go to dashboard and let's grab a horizontal container on top of our table
and here we're going to go and put inside this container the field names so let's just make it a little bit smaller
and let's start adding texts so this is the the first text so the first information going to be the rank so
let's have a rank let's change the font to a medium and let's change the size to 10 and make it little bit lighter for
the colors all right so let's go with this let's hit okay and let's go and add another one for the next field so make
sure to be on the right side customers and we're going to do the same stuff we going to be medium it then and
this color we can go and copy it for the next one so let's go and hit okay and now let's go and keep adding our field
so the next one going to be the last order date so let's paste the old one and we're going to call it last order so
that's it let's it okay and then we have the current profit so let's grab a text and instead of the current profit I'm
going to go and add the parameter and then the word profit let's go and make sure that
everything has the same format so you're going to be taow medium then and the same coloring let's copy it for the next
one so we're going to add another text for the sales paste it let's have a sales and the last one going to be the
number of orders so let's write it like this paste it remove the year we don't need it here so that as you can see we
got our titles what we're going to do we're going to go and remove the titles from the original table so let's hide
the fill labels and as well let's hide the header all right so next we're going to start working on the alignment
between the titles and the detail list so we're going to start moving stuff around first I'm going to go and make it
a little bit bigger and then we going to start moving those boxes on top of their informations until everything matches so
the last order a little bit to the right side maybe make this field a little bit smaller and then let's go and push the
sales a little bit to the right side and as well the profits and now we're going to go and push this as a little bit to
the right side as you can see we don't have any more spaces for the order let's go and just call it orders all right and
we're going to go and move it again a little bit to the top okay so I'm happy with that everything is perfect and now
we have formatted all the charts that we have inside the customer dashboard next we're going to go and start cleaning up
the filter information so let's go and show the filter what is happening here okay so now what we're going to do we're
going to go and remove all additional informations that tblo did add to our new container we don't need all those
informations so let's go and remove them one by one and with that we got exactly like before the same container and of
course you can go and start testing your dashboard again so we can go and switch it for example to 2022 and as you can
see everything changed even with we have a new top 10 customers we can go and add for example different subcategories and
everything is reacting so everything is perfect let's go and put everything back to 2023 and with that we have fixed our
filter let's go and close it so let's hide it all right so now the next step with that we're going to go and add
interactivity in those charts so make sure to select the histogram and use it as a filter and with that if the users
go anywhere and start selecting stuff for example those two and with that as you can see the dashboard is reacting
let's deselect all right so now let's do the same stuff for our top list let's go and make it as a filter and now we can
go and select our top customer and we're going to have a quick analyzis only for this customer which is really nice so
let's go and select that and with that we are done with the interactivity inside our dashboard now moving on to
the last step where we're going to work with the icons in order to make navigating our two dashboards very easy
okay so now let's go and fix this icon over here so double click on it and now finally we can see it's going to
navigate to customer dashboard and now since we are at the customer dashboard we're going to show an icon that is like
an active icon in order to do that let's go and choose the icon so as you can see this one going to be the active icon if
the customer select the customer dashboard so let's go and select that so now everything looks good let's go and
hit okay and with that you can see we have a new icon that indicates we are now at the customer dashboard all right
so now next we're going to go and fix the sales dashboards icons over here so let's go inside it and now we get to the
customer dashboards and let's choose the one that is not active so we're going to go and select this icon all right so
that's all okay so now let's go to the sales dashboards over here and change it to an active icon so we're going to
choose this one over here sales dashboards active so select that and let's have an okay all right so that's
it with that we have fixed the icons so the sales dashboard is going to be activated if you go to the customer
dashboard it's going to be exactly the way around all right guys so with that we are done with the second dashboard
inside our project let's go and test everything so let's go in the present presentation model over here and let's
check the data all right so now we are at the customer dashboard let's go and click on this container over here as you
can see everything is working nice so now let's go and switch back to the sales dashboard so let's
click on this icon and now as you can see we are back to the sales dashboard so with that the user should not go to
the tabs and switch between those two dashboards the users can just go and click on those icons in order to switch
between those two dashboards and with that I'm really happy to announce our project is completed and we have
fulfilled all the requirements I will leave this project inside Tableau public or you can get it from the download link
all right so with that we have completed our Tableau projects and we walked through all the phases that I usually
follow in order to implement any Tableau projects from the scratch from the requirements until the delivery of the
dashboards and here again my recommendation is that to not rush the projects where you can go immediately
start building charts and dashboards without having a clear or organized plan so do it step by step in order to
deliver clean work hi I'm very proud of you that you made it until the end I hope you enjoyed the journey and I know
it wasn't easy going through all those complex tutorials but you made it until the end and now I can say that you have
learned everything that you need to start doing amazing projects in Tableau and as well you have learned everything
that I know about Tableau and how I usually Implement real life projects in Tableau so now I'm going to ask you for
one more thing if you found this video helpful and it helps you to start working with Tableau I really appreciate
it if you like it and share the content with the others and of course if you have any questions or suggestions for
the next topic that you want me to cover in the future or you want to give me a feedback make sure to use the comment
below well nothing left to say thank you so much for watching this course and I will see you in the next course bye
The 'Master Tableau' course focuses on teaching users how to effectively visualize data and create dashboards using Tableau. It covers a wide range of topics from beginner to advanced levels, including data modeling, filtering, calculations, and dashboard design, ensuring a comprehensive understanding of Tableau's capabilities.
The course lasts for 21 hours and includes over 250 animated sketch notes to simplify complex concepts. Additionally, participants receive free materials such as datasets, Tableau sheets for practice, and downloadable sketch notes to enhance their learning experience.
There are no strict prerequisites for this course, making it suitable for both beginners and experienced users. However, a basic understanding of data concepts and familiarity with data visualization principles can be beneficial for maximizing the learning experience.
The course includes a real-world Tableau project that guides learners from user requirements to mockups, data source preparation, and dashboard assembly. This hands-on approach ensures that participants can apply their skills in practical scenarios, enhancing their ability to deliver professional dashboards.
Participants will learn to create over 63 types of charts and visualizations, including bar charts, line charts, pie charts, heat maps, and more. The course emphasizes the importance of selecting the right chart type for effective data storytelling and decision-making.
Yes, the skills acquired in this course are transferable to other business intelligence tools like Power BI and Qlik. The course emphasizes best practices and performance optimization, which are applicable across various data visualization platforms.
Tableau parameters are dynamic values that can replace a constant value in calculations, filters, and reference lines. They allow for user-driven interactivity in dashboards, enabling users to swap dimensions or measures, create dynamic titles, and enhance the overall user experience.
Heads up!
This summary and transcript were automatically generated using AI with the Free YouTube Transcript Summary Tool by LunaNotes.
Generate a summary for freeRelated Summaries
Master Excel for Data Analysis: From Basics to Interactive Dashboards
Learn Microsoft Excel for data analysis starting from the basics to advanced features like formulas, pivot tables, and Power Query. This comprehensive guide covers data cleaning, dynamic filtering, advanced lookup functions, and building interactive dashboards for real-world business insights.
Master Microsoft Excel for Finance: From Basics to Financial Modeling
This comprehensive Learnit course series, led by Elyssa Smith, covers Microsoft Excel essentials tailored for finance and accounting professionals. Learn data entry, formulas, financial functions, advanced lookups, financial modeling, and visualization techniques to build income statements, balance sheets, and cash flow statements.
The Ultimate Guide to Apache Spark: Concepts, Techniques, and Best Practices for 2025
This comprehensive 6-hour masterclass covers everything you need to know about Apache Spark in 2025, from architecture and transformations to memory management and optimization techniques. Learn how to effectively use Spark for big data processing and prepare for data engineering interviews with practical insights and examples.
Unlocking the Power of Go: A Comprehensive Programming Course for Beginners
Learn Go programming with our comprehensive course for beginners. Master the fundamentals and build real-world projects!
Comprehensive Guide to Python Pandas: Data Inspection, Cleaning, and Transformation
Learn the fundamentals of Python's Pandas library for data manipulation and analysis. This tutorial covers data inspection, selection, cleaning, transformation, reshaping, and merging with practical examples to help beginners master Pandas.
Most Viewed Summaries
Kolonyalismo at Imperyalismo: Ang Kasaysayan ng Pagsakop sa Pilipinas
Tuklasin ang kasaysayan ng kolonyalismo at imperyalismo sa Pilipinas sa pamamagitan ni Ferdinand Magellan.
A Comprehensive Guide to Using Stable Diffusion Forge UI
Explore the Stable Diffusion Forge UI, customizable settings, models, and more to enhance your image generation experience.
Pamamaraan at Patakarang Kolonyal ng mga Espanyol sa Pilipinas
Tuklasin ang mga pamamaraan at patakaran ng mga Espanyol sa Pilipinas, at ang epekto nito sa mga Pilipino.
Mastering Inpainting with Stable Diffusion: Fix Mistakes and Enhance Your Images
Learn to fix mistakes and enhance images with Stable Diffusion's inpainting features effectively.
Pamaraan at Patakarang Kolonyal ng mga Espanyol sa Pilipinas
Tuklasin ang mga pamamaraan at patakarang kolonyal ng mga Espanyol sa Pilipinas at ang mga epekto nito sa mga Pilipino.

