Context Transition in Power BI Three similar-looking formulas. Three completely different mechanisms. Let me break it down 🛠️ 📅 Example 1: Best Selling Day We have an existing Calendar table in our data model. Since it's structured at the day level, MAXX iterates through each day, calculates [Total Sales] for that specific day, and returns the maximum. The granularity of the Calendar table determines that we get the best-selling day. 📦 Example 2: Best Selling Product Same logic, different table. Our Products table exists at the SKU level (product code level). MAXX iterates through each product, evaluates [Total Sales] for that product, and returns the winner. The table's granularity gives us the best-selling product. 🗺️ Example 3: Best Selling Region Here's where it gets interesting. We don't have a dedicated dimension table for regions in our data model. So we create a virtual table using VALUES(Sales[Region]). This extracts all unique regions from the Sales table, and MAXX can then iterate through them to find the best-selling region. 🔑 The key insight: Context transition happens when MAXX iterates and converts each row into a filter context for the measure to evaluate. But the granularity of what you're iterating over, whether it's a physical dimension table or a virtual table, determines what "best" actually means. Physical tables = leverage your data model structure Virtual tables = create analysis paths that don't exist in your model #PowerBI #DAX
It's interesting that simply providing the table automatically takes us to the most granular level of data available. Is that correct?
This is a really good example. Especially for those who are new to Power BI, the context transition concept can be quite confusing. Seeing more content like this would be really helpful for understanding data-related concepts better.
Really appreciate. Please come up with more ideas on context transition.
Nice, allthough I think top3 is more interesting, and I think you would go No Calculate then, right?
Amazing
Key - Find the exact level of Granularity where you want the calculation.
Senior Data Analyst at @Lojas Renner
3wI love this kind of content, when we can see dax’s power!!! Thanks a lot