Member-only story
Context Filters are a powerful feature in Tableau vs Power BI.
Here’s how you use the concept in Power BI.
How to use one of Tableau’s best features, in Power BI
Context Filters:
From Tableau to Power BI (Or: How I Learned to Stop Worrying and Love DAX)
Oh, you miss Tableau’s context filters? I feel you. Like really, really feel you. But dry those tears, data friend, because I’m about to show you how to recreate that magic in Power BI, and maybe even have some fun doing it.
Let’s Start With a Ridiculous Example 🎪
Imagine you’re managing a circus (because why not?). Here’s our tiny dataset:
The Solution (In Three Not-So-Painful Steps)
First, create your base measure. Let’s calculate average revenue:
DAX
Avg_Revenue = AVERAGE(Circus[Revenue])
Now, here’s where the Power BI magic happens. Create a measure with your context:
DAX
Avg_Revenue_by_Experience =
CALCULATE(
[Avg_Revenue],
FILTER(
ALL(Circus)…