Tag Archives: DAX

pareto chart dailybitalks.com

How to Create a Pareto Chart in Power BI

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

  1. Insert a bar chart or clustered column chart.
  2. Drag Sub-Category to the X-axis.
  3. Drag Sales to the Y-axis.
  4. 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:

Cumulative Sales = 
VAR CurrentRank = RANKX(
    ALL('Orders'[Sub-Category]),
    [Total Sales],
    ,
    DESC,
    Dense
)
RETURN
CALCULATE(
    [Total Sales],
    FILTER(
        ALL('Orders'[Sub-Category]),
        RANKX(ALL('Orders'[Sub-Category]), [Total Sales], , DESC, Dense) <= CurrentRank
    )
)

Step 5: Create Cumulative Sales Percentage Measure

Now, calculate the % of cumulative vs. total:

Cumulative Sales % = 
DIVIDE(
[Cumulative Sales],
CALCULATE([Total Sales], ALL('Orders'[Sub-Category]))
)

Step 6: Convert to Pareto Chart Using Dual Axis

  1. Change the chart to Line and Clustered Column Chart visual.
  2. Set up the following:
    • Shared Axis: Sub-Category
    • Column y-Axis Values: Total Sales
    • Line y-Axis Values: Cumulative Sales %
  3. 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:

pareto chart dailybitalks.com
  • 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

TipRecommendation
Use RANKXRANKX is crucial for accurate cumulative calculations
Use ALLSELECTEDKeeps slicers functional when building visuals
Show % on AxisMakes cumulative line easier to interpret
Add 80% LineMakes the “Pareto point” visually obvious
Use Dual AxisCombine 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.

mastering powerbi dax dailybitalks.com

Mastering DAX: Top 10 DAX Functions Every Power BI User Should Know

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.

Continue reading
power bi time intelligence dailybitalks.com

A Guide to Power BI Time Intelligence Functions

In the dynamic world of business analytics, understanding trends over time is crucial. Power BI’s Time Intelligence Functions empower users to perform complex time-based calculations with ease, transforming raw data into actionable insights. This blog explores key Time Intelligence Functions, complete with examples and real-world applications.

Continue reading
powerbi dax all allselected dailybitalks.com

Power BI Tips: How to use ALLSELECTED and ALL in DAX?

In a previous post about how to use Tableau Exclude LOD in Power BI, we briefly mentioned ALLSELECTED. However, ALLSELECTED is a more powerful and complex function than we covered at that time. In this article, we’ll delve deeper into not only ALLSELECTED but also its counterpart, ALL, to fully understand their capabilities and applications in Power BI.

Continue reading
Best Practices and Essential Tools to Optimize Power BI Reports dailybitalks.com

Best Practices and Essential Tools to Optimize Power BI Reports

Power BI is one of the most powerful business intelligence tools available, enabling organizations to visualize, analyze, and share insights efficiently. However, as your datasets grow and your reports become more complex, performance can degrade, leading to slow report loading times and a frustrating user experience. To ensure your Power BI reports are fast, responsive, and user-friendly, it’s essential to follow optimization best practices and leverage the right tools. In this article, we’ll explore the best strategies and tools for optimizing Power BI reports.

Continue reading
How to Join Two Tables on Multiple Columns dailybitalks.com

Power BI Tips: How to Join Two Tables on Multiple Columns

Joining tables in Power BI is a common task when working with data models, especially when your tables don’t have a straightforward one-to-one relationship. Sometimes, you may need to combine two tables using multiple columns as the linking fields. This is where creating a composite key comes in handy.

Continue reading