In Business Intelligence (BI), SQL is used to extract and manipulate data from databases, while Python adds flexibility for data processing, visualization, and automation. Combining both enables you to build powerful, automated BI pipelines and dashboards.
Stacked bar charts are often used to display the breakdown of data within categories, but they have a big drawback: once you go beyond the first layer, comparing the rest becomes visually difficult. That’s where grouped bar charts step in.
In this guide, we’ll walk through a smart workaround for creating grouped bars in Tableau—based on a clever trick originally shared by Kevin Flerlage. We’ll use the Superstore dataset to compare sales across segments within regions, laid out cleanly and clearly.
Step 1: Set Up the Base View
Open Tableau and connect to the Sample – Superstore dataset.
Drag Region to the Columns shelf.
Drag Sales to the Rows shelf.
Set Mark Type to Bar.
You now have a basic bar chart showing sales by region.
Step 2: Duplicate the Dimension to Force a Group
Now we want to break each Region into groups for each Segment (Consumer, Corporate, Home Office). But instead of stacking, we want those bars side by side.
Here’s the trick:
Drag Segment to the Columns shelf, and drop it to the right of Region.
The structure should now be: Region → Segment on Columns.
This effectively creates mini-clusters within each Region—exactly what we want.
Now drag Sales to Rows again (or reuse the one already there). It should now create individual bars for each Segment per Region.
Step 3: Synchronize Color & Labeling
Drag Segment to Color on the Marks card to give each bar a distinct hue.
Drag Sales to Label on the Marks card to show values directly on each bar.
Adjust label alignment if needed—top of bar is often best for readability.
Step 4: Add a Total Reference Bar
Now here’s the genius part. We want to include the total sales for each Region behind the grouped bars, using a faint background bar to show the full total. This gives us both segment detail and region-level context.
Steps:
Duplicate the Sales field in the data pane (right-click → Duplicate). Change it to WINDOW_SUM(SUM([Sales])) and make sure only select Segment as dimension.
Right-click on the second axis (Total Sales) and choose Dual Axis.
Right-click the secondary axis again and choose Synchronize Axis.
On the Marks card, you’ll now have two layers:
One for Sales by Segment
One for Total Sales by Region
Customize the Total Bar:
Click on the WINDOW_SUM layer in the Marks card.
Set Mark Type to Bar.
Remove Segment from the Color shelf for this layer—it should be a solid light color (e.g., gray or light blue).
Bring the Segment bars to the front by adjusting the transparency or size of the total bar.
(Optional) Add Region to Tooltip on the Total Sales layer to explain the background bar.
This creates a light “shadow bar” showing the full total of each region, with individual segment bars layered on top.
Step 5: Clean Up the View
Now we have a bar-in-bar chart, but there are gaps between the bars. How can we remove the blank space from the background bars? This can be achieved using the [Total] trick.
From Analysis -> Total ->Add All Subtotles
Single click on the subtotal bar, under the dropdown of automatic, click on Hide, you will see this bar disappeared without losing its place.
Format Total label to remove text and resize the background bar go group background bar together.
Remove grid lines and polishing the format, and you will have a nice-looking bar-in-bar chart!
Why This Method Works
This approach gives you the best of both worlds:
You maintain individual bar clarity for each Segment.
You also display total context with the background bar.
You avoid stacking confusion and make visual comparisons much easier.
Compared to standard stacked bars, grouped bars with total references are more readable, intuitive, and informative, especially when you’re working with more than two subcategories.
You can replicate this chart in any version of Tableau with the default Superstore dataset. This grouped bar method makes a great alternative to stacked bars—especially when clarity matters.
A Pareto chart is a powerful visualization that combines both bar and line charts to identify the most significant factors in a dataset. Named after the Pareto principle (also known as the 80/20 rule), it helps users focus on the causes that generate the majority of results. In this article, we’ll walk through how to build a Pareto chart in Power BI using the Superstore dataset, a common sample dataset used in data visualization training.
What Is a Pareto Chart?
A Pareto chart typically:
Shows individual values in descending order as bars (e.g., sales by category).
Shows cumulative percentage of the total on a secondary line chart.
It is often used to identify the top contributors to a result—e.g., which few customers generate most of the sales, or which few products are responsible for most complaints.
Dataset: Superstore Sample
The Superstore dataset contains transactional data including:
Customer Name
Product Name
Category and Sub-Category
Sales, Profit, Quantity
Region, State, City
Order Date
You can download this dataset in Excel or CSV format from multiple sources online. In Power BI, load the dataset by choosing Home > Get Data > Excel and selecting the relevant sheet.
Step-by-Step Guide
Step 1: Load the Superstore Dataset
Open Power BI Desktop
Click Home > Get Data > Excel
Choose your Superstore file and import the dataset (usually named Orders)
Step 2: Create a Bar Chart with Customer Sales
Insert a bar chart or clustered column chart.
Drag Sub-Category to the X-axis.
Drag Sales to the Y-axis.
Sort by Sales descending.
Step 3: Create a Measure for Total Sales
Go to Modeling > New Measure, and create:
Total Sales = SUM(Orders[Sales])
Step 4: Create a Measure for Cumulative Sales
Now create a cumulative sum based on the Sub-Category ranking:
Change the chart to Line and Clustered Column Chart visual.
Set up the following:
Shared Axis: Sub-Category
Column y-Axis Values: Total Sales
Line y-Axis Values: Cumulative Sales %
Sort by Total Sales in descending order.
Customize Your Pareto Chart
Format the line chart to show percentage (under Data labels > Display units = Percentage).
Enable data labels on both bars and lines.
Adjust color for better contrast between bars and line.
Add a reference line at 80% to highlight Pareto threshold
You will now see:
Bars: Total sales by sub-category, descending
First line: Cumulative % climbing from 0% to 100%
Second line: Flat 80% across the chart
You can now visually identify the sub-category at which cumulative % crosses 80%
Tips and Best Practices
Tip
Recommendation
Use RANKX
RANKX is crucial for accurate cumulative calculations
Use ALLSELECTED
Keeps slicers functional when building visuals
Show % on Axis
Makes cumulative line easier to interpret
Add 80% Line
Makes the “Pareto point” visually obvious
Use Dual Axis
Combine line and bar cleanly with correct proportions
Pareto charts are a great way to derive actionable insights from your data using Power BI. With just a few DAX measures and the Line and Clustered Column Chart, you can clearly visualize top contributors and make data-driven decisions.
When working with Power BI, mastering DAX (Data Analysis Expressions) is essential for unlocking advanced analytics and building dynamic, interactive reports. DAX is the formula language used to perform calculations, aggregations, and analysis within Power BI. Whether you’re a beginner or an advanced user, understanding the top DAX functions for Power BI is critical to transforming your data and gaining valuable insights.
If you’ve ever stared at a blank Tableau dashboard wondering how to move beyond bar and line charts — you’re not alone.
Sure, those basics serve a purpose. But data storytelling is about more than ticking boxes. It’s about helping your audience see the story behind the numbers. That’s why I started building a personal catalog of unique, visually engaging Tableau chart types — and now I’m sharing them with you.
Data visualization is a powerful tool for conveying insights, but the effectiveness of a visualization largely depends on how well the chosen chart represents the underlying data. As a data analyst, selecting the appropriate chart type is critical to ensuring your message is communicated clearly and effectively. In this guide, we’ll explore the most common chart types, their strengths and weaknesses, and when to use each one.
Working with dates in Tableau is essential for trend analysis, time-series visualizations, and dynamic dashboards. Tableau provides a rich set of date functions that help you parse, manipulate, and calculate date values with ease.
Radar charts, also called spider charts, are great for comparing multiple variables across categories. While Tableau doesn’t natively support radar charts, you can still build one using calculated fields and some data reshaping.
In Power BI, effectively ranking data is crucial for insightful analysis. Two primary DAX functions facilitate this: TOPN and RANKX. While both serve to rank data, they operate differently and are suited for distinct scenarios.
In the world of data processing, SQL is the lingua franca—but not all SQLs are created equal. If you’ve worked with big data tools like Apache Hive, you’ve probably noticed that Hive SQL isn’t exactly the same as traditional SQL used in relational databases like MySQL, PostgreSQL, or SQL Server.