Posts

[Power BI] DAX ALL Function Practical Series ② Mastering Ranking (Ranking Analysis, Top-N, Pareto Analysis) - Part 1

Image
In Power BI, ranking analysis goes beyond simple data sorting; it is a vital method for understanding market structures. While a simple sales report focuses on the past record of "how much was sold," ranking analysis answers more critical questions: Which of our products is the number one bestseller? What percentage of total sales do the top 20% of products generate? How much has this month's rank changed compared to last month? How does the ranking of popular products differ from store to store? To answer these questions, you must use the RANKX function in conjunction with the ALL function. The ALL function plays an especially crucial role in ranking analysis because it restores data hidden by filters, creating a "complete competitive landscape that includes invisible competitors." Power BI Ranking Analysis Series This series consists of five practical analysis parts: Part 1 — Global Ranking (RANKX + ALL) -- Current Post Part 2 — Top-N & Others (Pareto) Par...

[Power BI] DAX ALL Function Practical Series ① Mastering Mix & Share (Market Share & Contribution Analysis)

Image
In the previous post, we summarized the two faces of the ALL function: the Filter Modifier and the Table Provider. Today, as our first practical pattern, we will master "Mix & Share" analysis—the most widely used technique in the field—and the design of Performance Indices derived from it. The purpose of this post is clear: "When you calculate shares accurately, your sales strategy changes." This is not just a list of formulas. It is a full-course guide starting from DAX design based on actual sales data, moving to numerical verification, and ending with strategic interpretation.   1. Why is Mix Analysis Important? 1.1 Mix is Not Just a Simple Percentage  Simple sales figures are merely results, but "Share" is a map for designing the future. Through Mix analysis, we obtain management answers to the following questions. We calculate share for one reason: to see the structure. Store Mix: How much does each store contribute to total sales? Product Mix:...

[Power BI] Two Faces of the DAX ALL Function: 5 Practical Patterns You Can Use Right Away

Image
In the world of Power BI, the decisive turning point that separates beginners from pros is the ability to leverage the ALL function. While many beginners understand ALL simply as an "eraser that wipes away filters," pros use it as a "strategic tool to redefine the foundation of calculation." Today, as a data analyst, I will perfectly summarize the five core patterns of the ALL function that can be applied immediately in the field.   1. The Essence of the DAX ALL Function: Filter Modifier vs. Table Provider Inside the engine, the ALL function possesses two powerful identities: Filter Modifier: Inside a CALCULATE function, it ignores existing filters (such as slicers) and redefines the baseline for calculation. Table Provider: It re-summons the original data that was filtered out and supplies it as a virtual table to serve as the raw material for calculations. When these two identities meet practical business scenarios, the following powerful analytical metrics are ...

[Power BI] The True Identity of the DAX ALL Function: How is Filter Ignoring Actually Accomplished?

Image
When you first encounter Power BI, ALL feels quite simple. We are taught that it is just a "function that removes all filters." However, in the complex world of practical DAX expressions, ALL takes on two completely different identities depending on its role: Partner of CALCULATE: A Filter Modifier. Used in Iterators (SUMX, FILTER) or where a Table Expression is required: A Table Function. At a glance, both seem to "remove filters," making it easy to think they operate identically. However, the internal mechanics are completely different. One changes the rules of calculation, while the other physically generates and passes a full list of data. The true identity of ALL begins to reveal itself the moment you distinguish between these two usage patterns. Today, based on these two structures, let's clarify what the ALL function exactly does.   1. A Familiar Misconception about ALL: "A function that ignores filters" In my early days, I understood ALL only...

DAX Deep Dive 04 : Why Do Pros Choose REMOVEFILTERS Over ALL?

Image
What distinguishes a "pro" from an "intermediate" user in Power BI? It is whether they understand and use functions based on their intrinsic roles. While many users try to handle both filter removal and table creation using only the ALL function, in the world of large-scale models, this slight ambiguity leads to maintenance nightmares and performance bottlenecks. In 2019, Microsoft introduced the dedicated tool REMOVEFILTERS for very clear reasons: Intent: Is the calculation logic immediately clear upon reading the code? Structure: Is it preventing the unnecessary creation of virtual tables? Performance: Can the engine modify the filter context in the most efficient way? Beyond a simple syntax comparison, discover how to use REMOVEFILTERS to complete the aesthetics of your DAX design.   1. Historical Background: An Evolution That ALL Could Not Handle Alone 1) ALL – The "Solitary Founding Member" of the Power Pivot Era The ALL function was introduce...

DAX Deep Dive 03: Why is Your Power BI Report Crawling? Let’s Solve the Mystery.

Image
DAX Optimization Technique: Execution-Aware DAX Design When a Power BI report is slow, most users suspect the following: Is it because the data volume is too large? Is the visualization too complex? Are functions like SUMX or CALCULATE too heavy? However, the real cause most frequently encountered in practice is something else entirely: the developer is unaware that the engine is performing unnecessary calculations "until the very end." This post addresses exactly that point. Today, we will explore "Execution-Aware DAX Design"—the core of DAX performance optimization—and the "Early Exit" technique, which physically removes unnecessary operations.   1. Why Does DAX Calculate Useless Things Until the End? DAX is inherently a language that "seeks to preserve meaning." While general programming decides its path based solely on the "current value," DAX is a perfectionist that considers data relationships and every possible change. Let’s u...