VizWiz

Launch, grow, and unlock your career in data
Showing posts with label table calculation. Show all posts

June 30, 2024

How to Rank & Filter the Top 5 in Tableau in Under 60 Seconds!

No comments
In this tip, you will learn how to show the rank of each team in MLB by homeruns for 24 seasons. 

We'll start by computing the RANK table calculation for each Season before filtering to only the top 5 Teams in each Season.

April 29, 2024

How to Create a Comet Chart in Tableau

No comments
A comet chart is a type of visualization used to display the trajectory of data points over time. 

They’re often used to compare one time period to another to see the direction of the change.

The tail starts at the first time period and grows like a comet to the second period.

April 13, 2024

25 Example to Help You Master Calculations in Tableau

No comments
I guarantee that if you study these 25 examples, you'll be on your way to mastering Tableau calculations. 

Credits to Sara Hamdoun and Fuad Ahmed.

 

April 9, 2024

How to Create a Floating Bar Chart in Tableau

No comments

A floating bar chart is similar to a Gantt chart, except it shows the range of two data points instead of two dates.

October 17, 2023

The End of an Era: Watch Me Viz's Decline Unveiled

No comments

That's a wrap. Watch Me Viz has retired, for good. 

This week's data was about the performance of all of the WMV livestreams. There was some incredible viewer participation, which ultimately led to this viz that explains why WMV should quietly disappear.

Check out the livestream below.



September 12, 2023

How to Calculate Weekday-Only Sales in Tableau

No comments

Have you ever wondered how to compare sales performance between two sets of weekdays? 

In this video, I'll show you how to calculate and compare sales for the last 10 weekdays against the prior 10 weekdays—all while excluding weekends. 

What You Will Learn:

  1. Setting up your data source for comparison
  2. Creating calculated fields for two sets of weekdays
  3. Configuring table calculations to get only the days you need
  4. Filtering out weekends from both data sets
  5. Implementing advanced date functions for comparison
  6. Visualizing and comparing sales for both sets of weekdays

Background Context:

Tableau enables you to conduct intricate data analyses, but comparing specific sets of weekdays can be tricky. This tutorial simplifies that process, focusing on comparing the last 10 weekdays' sales with the 10 weekdays preceding them.

Assumptions:

  1. You have a foundational knowledge of Tableau.
  2. Your sales data contains date information.
  3. You've previously worked with calculated fields in Tableau.

Related Videos:

  1. Tableau for Beginners: Link
  2. Everything you need to know about table calcs: Link

Resources:

  1. Workbook & data: Link


June 12, 2023

#MakeoverMonday 2023 Week 24 - Cereal and the Green Revolution: Yields vs. Land Use

No comments

At the global level, how has crop production changed over the last fifty years? 

In this Watch Me Viz live stream, I analyzed how the yield and land use of producing cereal has changed over the last 50 years.

I really liked the original visualization, so I rebuilt it in Tableau. I learned how to use dynamic zone visibility, layout containers, and more. Check it out.



Resources:

1. Data - https://data.world/makeovermonday/2023w24

2. Final Dashboard - https://tabsoft.co/3P3Sdl3


===============

Watch Me Viz is a weekly live stream where I help people become better at #Tableau, #PowerBI and data analysis. I show how I take an existing visualization, critique it, analyze the data, and build several visualizations all the while looking for a "better" visualization than the original.

If you are considering participating in Makeover Monday, you can get started by downloading data sets from the Makeover Monday website. I promise you'll become better at data analysis and data visualization by practicing every week.

Data sets - https://www.makeovermonday.co.uk/data/

===============

LEARN FROM ME

Join my newsletter. Sign up at andykriebel.com


ARE YOU INTERVIEWING FOR A NEW JOB?

Contact me for more information about how I can help you prepare for that big interview.

coaching@makeovermonday.co.uk

===============

CONNECT WITH ME

https://linktr.ee/andykriebel

More Watch Me Viz - https://bit.ly/WatchMeViz2023

May 30, 2023

How to Create a Radial Bubble Chart in Tableau

No comments
If you’re looking for something beyond the basic line chart in Tableau, this radial bubble chart might be exactly what you’re looking for. And the best part, it only takes 6 calculations and 8 steps. 

But be careful, this isn’t the easiest chart to read. Use it with caution and make sure you understand your audience.

A special thank you to Trea McElhone at The Data School for teaching me how to create this. I extended her work to do all of the calculations directly inside Tableau, which helps it be flexible for more use cases as I demonstrate.

DOWNLOAD the data and starter and solution workbooks for $2 (this covers the costs of making this and future videos):

I would appreciate your support, however, if you want the Excel files for free, download them here:

Sign up for my newsletter to get advance, exclusive viewing of all of my videos, tips for using Tableau, and exclusive discounts on products I create.

First, we’ll create all of the calculations.
Second, we’ll build and configure the chart.
Lastly, we’ll use parameters to customize the chart to make for a great user experience.

April 11, 2023

How to Create a Jittered Bar Chart in Tableau

No comments

Are you tired of the same old boring bar charts? Add some flair to your data visualization with a jittered bar chart! See more of your data without losing scope of the overall. 

To create one, simply add a random amount of noise to the x-axis and y-axis of your bar chart. This will add more granularity to your data, prevent overlapping and give your chart a unique look. Try it out and impress your colleagues with your data viz skills! 

Here’s a video to help you create your own.


March 16, 2023

How to Dynamically Resize Marks in Tableau

No comments

In this video, I show you how to resize marks (in this case circles) dependent on how many marks are in the view. For example, if all possible marks are in the view (100%), the circles should be small. If only 10% of possible marks are in the view, the circles should be large.

I show how to do this on a map, but it can be extended to scatter plots, box plots, dot plots, jittered bar chart, and more.

September 15, 2022

Table Calculations vs. Level of Detail Expressions - % of Total

No comments
In this video, I show you the difference between table calculations and level of detail expressions with the % of total calculation. I review: 

  1. How to compute a % of total with a table calc 
  2. How to compute a % of total with an LOD 
  3. How filters impact these calculations 
  4. How context filters impact level of detail expressions 
  5. Tableau's order of operations 

Download the workbook here. Download the order of operations chart here.

September 12, 2022

#MakeoverMonday 2022 Week 37 - Berkshire Hathaway Holdings

No comments

During Watch Me Viz, I covered set actions, parameter actions, highlighting, boolean calculations, table calculation, dashboard layout, and I failed at a starburst chart (I couldn't get the years to sort properly; I'll post it when I figure it out).

Enjoy! Check out the viz below the video.

 

September 5, 2022

#MakeoverMonday 2022 Week 36 - Median Age at First Marriage in America

No comments

This was a relatively simple data set and I was able to build quite a few vizzes during Watch Me Viz. I ended up with something more complex that it needed to be, but it was fun figuring out how to create the calculations.

Here's how it works:

  1. Compare the median age at first marriage of each state to the US average for 2006-2010
  2. Compare the median age at first marriage of each state to the US average for 2015-2019
  3. Check whether the State 
    1. Stayed above the US average in both time periods
    2. Stayed below the US average in both time periods
    3. Moved from below the US average to above the US average
    4. Moved from above the US average to below the US average

Got it? Yes, it a bit confusing. In the end, we were able to highlight 6 states that moved above the US average to below the US average. All others stayed the same. What does this mean from an analytical perspective? Probably nothing, but it looks better than the original.

Check out the viz below the video or here.

August 29, 2022

#MakeoverMonday 2022 Week 35 - The World's Biggest Military Spenders

No comments

Makeover Monday is back! Every Monday I'll be running a #WatchMeViz and every Wednesday, Eva will be running #VizReview. Subscribe to my YouTube channel for reminders of the latest events.

https://youtube.com/andykriebel

This week was a makeover of a visualization by Visual Capitalist about the top 10 military spenders. During Watch Me Viz, I iterated through 15 different charts before settling on a bump chart. If you want to learn about sets, parameters, table calculations, containers and more, watch the video below.

Below the video you can see my viz, or click here. Enjoy! If you need clarifications on anything, please comment on the video here.


August 17, 2022

Analyzing Seasonality with Cycle Plots

No comments
Cycle plots are exceptionally useful for analyzing seasonality in time series data. In this video, I walk you through two examples that show the limitations of traditional time series analysis and two examples of how cycle plots overcome these problems. 

Inspired by: Jon Schwabish
Download the workbook here.

May 25, 2022

#WOW2022 Week 20 - Monthly Sales vs. Target

No comments
Today I ran a live #WatchMeViz session to show how I completed Workout Wednesday 2022 week 20. I messed up a bit, even though I had done the challenge before, but that's part of the learning process! I hope you find the session useful. If you have any questions, please leave a comment on YouTube.

Resources


Enjoy!



March 22, 2022

Two Methods for Labeling the Top N Values in a Chart

No comments

In this tip I show you how to use the INDEX and RANK functions to label the top N values in a chart. I also explain the difference in how they work, and how the RANK function is simpler to configure.


February 2, 2022

How to Create a Jitter Plot

No comments

In this tip I show you how to create a jitter plot. A jitter plot is very similar to a dot strip plot other than it reduces the overlapping of the data points. The data is plotted like a dot plot and then we use either the RANDOM() or INDEX() functions to spread out the dots.

Data - https://data.world/vizwiz/mock-car-sales

January 19, 2022

Social Connectedness in the United States

No comments

NOTE: The insights you see in this post are based on an article by The Upshot from September 2018. Some of the insights and use cases demonstrated are the same and are shown in Tableau for demonstration purposes.

----------------------------

When I first saw the map that The Upshot created in How Connected Is Your Community to Everywhere Else in America? I was blow away by the simplicity of the map and how easy it is to understand the relationships of people in the United States via their Facebook friendships. The first thing you need to understand is the metric "Social Connectedness Index". You can access the data I used via the same link. 

Here's the formula Facebook uses to calculate the index:

From Facebook:

Social Connectednessi,j measures the relative probability of a Facebook friendship link between a given Facebook user in location i and a user in location j. Put differently, if this measure is twice as large, a Facebook user in i is about twice as likely to be connected with a given Facebook user in j.

In each dataset, we scale the measure to have a fixed maximum value (by dividing the original measure by the maximum and multiplying by 1,000,000,000) and the lowest possible value of 1. We also round the measure to the nearest integer.

I was not able to match the color scale in The Upshot exactly, so instead I used a table calculation that ranks each County in the U.S. compared to the County selected by the user.


Close enough for me! 

The data has columns for the State/County of the user and for State/County of the friend. To ensure that I was only looking at friends for the County selected, I used Parameter Actions to filter the user to the County and State selected. The rank calculation then only uses the SCI for the friends.

Now let's look through some of the use cases as described in The Upshot.


DISTANCE IS MOST IMPORTANT

People are more likely to be friends with people that live nearby. That makes sense. Consider these four counties that I lived in while I lived in the U.S. Clearly relationships on Facebook are more likely with people that lived near me.






STATE LINES ARE BOUNDARIES

In some counties (like the four below, friendships drop significantly outside State borders.




MIGRATION PATTERNS

People from certain areas of the country have migrated to other areas in the country over the course of many decades. We can see these patterns by looking at Chicago and Milwaukee. The southern counties were typically related to the slave trade, and the people in the south gradually migrated north after they were freed.



Migration patterns aren't limited to history. Consider counties in the Northeast. Nearly all of them have a strong relationship with coastal areas in South Carolina and Georgia and all of Florida. These are called snowbirds, people that migrate south for the winter.




PHYSICAL BOUNDARIES

Friendships in some counties are limited by geographical boundaries. For example, friendships for people living in Belmont County, Ohio don't cross the Appalachian Mountains in West Virginia.


While people in Scott County, Arkansas don't have friends on the other side of the Mississippi River.



Have some fun with the interactive version below.

January 5, 2022

How to Create a User-Defined Moving Average

No comments
In this tip, I show you how to use two parameters to create a view that allows the user to pick (1) the duration and (2) the date part to create a moving average calculation.

For example, this technique will allow the user to choose a 13-week moving average, a 6-month moving average, a 90-day moving average, etc.