Posts

What Should You Put Where the Table Belongs in the New Visual Calculations? – A Complete Understanding of the ROWS() Function

Image
When you first start using the new Visual Calculations feature in Power BI, you will surprisingly run into a bottleneck at the very beginning. This occurs precisely when attempting to deploy iterator functions such as SUMX, AVERAGEX, MAXX, and FILTER. Code that we used to take completely for granted in standard DAX suddenly stops working. SUMX(   Sales,   Sales[Qty] * Sales[Price] ) In a traditional measure, you simply needed to place the Sales table into the first argument. In a Visual Calculation, however, the exact moment you input a table name, an error is triggered. Initially, I assumed I was simply mistaken about the syntax. However, after days of testing various scenarios, I realized something fundamental: Visual Calculations operate on an entirely different paradigm from trad...

Power BI Table Tips : Why VALUES is More Critical Than DISTINCT? The Starting Point of DAX Context Thinking and Virtual Table Design

Image
When you begin to delve deeper into Power BI, an inevitable question arises at least once: "Aren't both VALUES and DISTINCT simply used for removing duplicates?" "The results look practically identical, so why does everyone use VALUES as the default?" "Honestly, at first glance, using DISTINCT doesn't seem to cause any major issues, does it?" In fact, when I first encountered DAX, I did not noticeably perceive the difference between the two either. This is because in simple sample datasets, the outputs appear almost identical. However, the moment real-world production data is introduced, the narrative changes entirely. Especially when: Discrepancies occur between ERP and online mall product codes, The registration of a new product SKU is delayed, or ...

DAX Deep Dive 11: A Snapshot That Halts the Filter Flow: The Decisive Moment a DAX VAR Becomes a 'Constant'

Image
When creating measures in Power BI, writing CALCULATE directly versus storing it inside a VAR appears to yield the same result on the surface. However, a massive divergence exists between the two regarding 'Evaluation Timing.' Today, this article explores the concept of 'Constantization' that occurs the exact moment a variable is assigned. 1. Example Data 1) Products ProductID ProductName Category UnitPrice P-001 MacBook Pro 16 Laptop 2500 P-002 iPad Pro 12.9 Tablet 1200 P-003 iPhone 15 Pro Mobile 1100 P-004 Airpods Max Audio 550 P-005 Studio Display Monitor 1600 P-006 Apple Watch Ultra Wearable 800 P-007 Mac Mini M2 Desktop ...

DAX Deep Dive 10: Why Your SUMX Total is Wrong – How CALCULATE Enables Context Transition

Image
Many people memorize the sentence, "CALCULATE transforms a row into a filter," yet they find themselves helpless when faced with errors in practice. The cause of this problem is not simple. The core issue is not merely that "transition occurs," but rather when and within what scope that transition is actually applied. To understand this mechanism most intuitively, we will introduce two concepts: The Eyes (Row Context): The gaze that reads through data line by line (Iterative functions). The Hands (Filter Context): The power to reconstruct the environment based on the information read (CALCULATE). Today, through three comparative scenarios—Measures A, B, and C—we will perfectly master how results change dramatically when only the 'Eyes' are open versus when the 'Hands' move together, and how to restore our Totals to nor...