5 Power BI DAX Functions You Didn’t Know Existed
From the publisher’s feed, collected in the ZeroLabs newsroom.
The functions your colleagues aren’t using — and why they should bePower BI DAXIntroduction: The DAX Functions Nobody TeachesEvery Power BI tutorial covers the same functions.CALCULATE. SUM. DIVIDE. TOTALYTD. SAMEPERIODLASTYEAR. IF.Valuable functions. Essential, even. But if every developer on your team knows the same six functions, everyone builds the same measures — and more importantly, everyone hits the same walls when those six functions aren’t enough.I’ve reviewed code from many Power BI developers across different industries. A pattern emerges quickly: most teams have a small repertoire of DAX they’re comfortable with, and when a business question doesn’t fit that repertoire, they either build an ugly workaround or say “Power BI can’t do that.”Power BI can do that. The function just has a name you haven’t heard yet.This article covers five DAX functions that are genuinely underused — not because they’re obscure, but because they’re rarely taught. Each one solves a category of problem that developers typically handle with far more complicated code.By the end, you’ll have five new tools that make your models cleaner, your measures faster, and your answers more accurate.Operational Lesson Before We Start: DAX Knowledge CompoundsBefore the functions — the lesson behind them.I used to approach DAX the way most developers do: learn what I need for the current project, copy patterns from Stack Overflow when stuck, move on.It works. Until it doesn’t.The problem with reactive DAX learning is that you never discover what you don’t know you’re missing. I spent months writing multi-step workarounds for ranking problems before someone showed me RANKX. I built complex IF chains for categorization before I found SWITCH. I manually filtered tables with FILTER() before I understood what KEEPFILTERS could do.Each of those discoveries saved me hours — not just once, but on every project afterward.The operational lesson: treat DAX like a toolkit, not a script library. Dedicate time each month to learning two or three functions you haven’t used before, even without an immediate use case. The return on that investment is asymmetric — an hour of exploration saves ten hours of workarounds across future projects.The five functions below are the result of that kind of deliberate exploration. Each one replaced something more complicated in a real dashboard I’ve built.Function 1: SELECTEDVALUE — The Clean Filter ReaderWhat It DoesSELECTEDVALUE returns the value of a column when there is exactly one value in the current filter context. If multiple values are selected (or none), it returns a fallback value you define.SELECTEDVALUE(column, [alternateResult])Why It ExistsReading what a user has selected in a slicer is a common need. Most developers write this:-- ❌ Common workaround (verbose and fragile)Selected Region =IF( HASONEVALUE(DimGeography[Region]), VALUES(DimGeography[Region]), "All Regions")This works, but it’s three functions doing the job of one. SELECTEDVALUE was introduced specifically to replace this pattern:-- ✅ Clean equivalentSelected Region = SELECTEDVALUE(DimGeography[Region], "All Regions")Real Business Use Case: Dynamic TitlesThe most powerful use of SELECTEDVALUE is building dynamic titles that respond to slicer selections.-- Dynamic dashboard title that updates with every slicerDashboard Title ="Sales Performance — " &SELECTEDVALUE(DimDate[Year], "All Years") & " | " &SELECTEDVALUE(DimGeography[Region], "All Regions") & " | " &SELECTEDVALUE(DimProduct[Category], "All Categories")When a user selects “2025”, “APAC”, and “Electronics” in slicers, the card shows: “Sales Performance — 2025 | APAC | Electronics”When nothing is selected: “Sales Performance — All Years | All Regions | All Categories”-- Dynamic benchmark target that changes by selected KPITarget Value =SWITCH( SELECTEDVALUE(SlicerTable[KPI]), "Revenue", 5000000, "Units", 10000, "Margin %", 0.35, BLANK())This powers a single card visual that shows the right target based on which KPI the user picks — no separate measures per KPI, no report pages per metric.The Pattern That Changes Everything-- Conditional measure behavior based on selectionRevenue Display =IF( SELECTEDVALUE(SlicerTable[View]) = "Budget vs Actual", [Budget Variance], [Total Revenue])One measure. Two completely different calculations depending on what the user selects. This is how professional dashboards eliminate the clutter of dozens of hidden measures.When to reach for SELECTEDVALUE:Dynamic titles and subtitlesConditional measure behavior based on slicerShowing the user what they’ve selectedSingle-value parameter tables (what-if parameters)Function 2: KEEPFILTERS — The Filter ProtectorWhat It DoesKEEPFILTERS is used inside CALCULATE to add a filter without removing the existing filter context on that column. It keeps both the existing filter and the new one.CALCULATE(expression, KEEPFILTERS(filter))Why It MattersCALCULATE normally replaces the filter context on a column. This is powerful but has a side effect that surprises developers:-- ❌ This ignores the slicer selectionElectronics Revenue =CALCULATE( SUM(FactSales[Revenue]), DimProduct[Category] = "Electronics")If the user has selected “APAC” in a region slicer and “Electronics” in a category slicer, this measure ignores the region slicer entirely — CALCULATE overrides the existing category filter without preserving the region filter interaction.Actually, the problem is more nuanced than that. CALCULATE replaces the filter on the same column being filtered. So if the user has "Electronics" selected in the slicer and you write DimProduct[Category] = "Electronics", you're fine. But if the user has selected "Supplies" and your measure forces "Electronics", the measure wins and the slicer is ignored.-- ✅ KEEPFILTERS respects the user's slicer selectionElectronics Revenue (respects slicers) =CALCULATE( SUM(FactSales[Revenue]), KEEPFILTERS(DimProduct[Category] = "Electronics"))With KEEPFILTERS, the measure only returns a value when the user's slicer selection includes "Electronics". If they've selected "Supplies", the result is blank — which is the correct behavior.Real Business Use Case: Benchmark Comparison-- Revenue vs Electronics benchmark, respects all other slicersElectronics Benchmark =CALCULATE( SUM(FactSales[Revenue]), KEEPFILTERS(DimProduct[Category] = "Electronics"), ALL(DimDate[Month]) -- Remove month filter to show full year benchmark)This measure calculates the full-year Electronics revenue as a benchmark, but still respects region, subsidiary, and any other slicers the user has applied. Without KEEPFILTERS, it would ignore the category slicer entirely.When to Reach for KEEPFILTERS-- Scenario: Show Top 3 category revenue, but only when those-- categories are already selected by the userTop 3 Categories Revenue =CALCULATE( SUM(FactSales[Revenue]), KEEPFILTERS( DimProduct[Category] IN {"Electronics", "Furniture", "Supplies"} ))-- This returns values only for categories in both:-- 1. The user's slicer selection-- 2. The hardcoded list-- If user selects "Clothing", this returns BLANK — correct behavior.When to reach for KEEPFILTERS:Adding a hardcoded filter that should still respect user selectionsBenchmark or target measures that shouldn’t override the slicerAny situation where CALCULATE seems to "ignore" a slicer selectionMulti-column filter intersectionsFunction 3: GENERATESERIES — The Sequence BuilderWhat It DoesGENERATESERIES returns a single-column table of values at a defined interval, from a start value to an end value.GENERATESERIES(startValue, endValue, [incrementValue])Why It’s UnderratedMost developers don’t realize they need this function until they’re trying to build something dynamic — a what-if parameter table, a custom axis, a threshold range — and discover that hard-coding values in a disconnected table is fragile and maintenance-heavy.GENERATESERIES creates these tables dynamically in DAX, no data source needed.Real Business Use Case 1: What-If Parameter TableBefore Power BI introduced the built-in What-If Parameter feature, GENERATESERIES was the standard way to build scenario slicers. It's still useful when you need more control than the built-in feature provides:-- Discount Rate Table (0% to 50%, in 5% increments)Discount Rate Table =GENERATESERIES(0, 0.5, 0.05)-- Then create the measure:Adjusted Revenue =[Total Revenue] * (1 - SELECTEDVALUE('Discount Rate Table'[Value], 0))The user picks a discount rate in a slicer. Every revenue figure on the dashboard adjusts automatically. No static table needed. No data source needed.Real Business Use Case 2: Custom Axis for Distribution Chart-- Revenue bucket axis for distribution analysisRevenue Buckets =GENERATESERIES(0, 1000000, 50000)-- Creates: 0, 50000, 100000, 150000, ... 1000000-- Measure that counts orders falling in each bucketOrders in Bucket =COUNTROWS( FILTER( FactSales, FactSales[Revenue] >= SELECTEDVALUE('Revenue Buckets'[Value]) && FactSales[Revenue] ))This creates a true distribution histogram from your transaction data — something Power BI’s native visualizations don’t support directly.Real Business Use Case 3: Aging Brackets-- AR Aging buckets: 0, 30, 60, 90, 120 daysAging Buckets =GENERATESERIES(0, 120, 30)-- Display label for each bucketAging Label =VAR BucketStart = SELECTEDVALUE('Aging Buckets'[Value])VAR BucketEnd = BucketStart + 30RETURNIF( BucketStart = 120, "120+ days", FORMAT(BucketStart, "0") & "–" & FORMAT(BucketEnd, "0") & " days")When to reach for GENERATESERIES:What-if scenario sliders (discount rates, growth rates, headcount)Custom axis ranges for distribution chartsAging brackets (AR, inventory, support tickets)Any numeric sequence that would otherwise be hand-typed in a static tableFunction 4: NAMEOF — The Maintenance SaverWhat It DoesNAMEOF returns the name of a column or measure as a text string, evaluated at compile time rather than runtime.NAMEOF(columnOrMeasure)Why It MattersThis function solves a subtle but expensive problem: when you rename a column or measure, any hard-coded string references to that name break silently. The error doesn’t show up immediately — it shows up the next time someone opens the report and sees a broken dynamic title or a missing label.-- ❌ Fragile: if you rename the column, this string becomes wrongColumn Label = "Revenue"-- ✅ Robust: follows the column name automaticallyColumn Label = NAMEOF(FactSales[Revenue])Real Business Use Case: Self-Documenting Dynamic Titles-- Title that automatically reflects the actual column being measured-- If someone renames [Revenue] to [Net Revenue], the title updatesChart Title ="Total " & NAMEOF(FactSales[Revenue]) & " by " & NAMEOF(DimDate[Month])-- Produces: "Total Revenue by Month"-- If Revenue is renamed to "Net Revenue": "Total Net Revenue by Month"Real Business Use Case: Error Messages and Tooltips-- Tooltip that names the exact measure driving the numberTooltip Text ="This value represents " & NAMEOF([Total Revenue]) &" for the selected period. " &"Calculation: SUM of all invoiced amounts, excluding returns."-- Validation message referencing the actual field namesData Warning =IF( ISBLANK([Total Revenue]), "No data found for " & NAMEOF(DimDate[Year]) & " = " & SELECTEDVALUE(DimDate[Year], "unknown"), BLANK())The Operational ValueNAMEOF is not glamorous. It doesn't make your calculations faster or more sophisticated. What it does is make your model more maintainable — especially in environments where column and measure names change as the business evolves.In an enterprise model with 50+ measures and 8+ dimension tables, a single column rename can break 12 different string references scattered across measures, titles, and tooltips. NAMEOF makes those references self-healing.When to reach for NAMEOF:Dynamic titles that reference column or measure namesDocumentation strings inside measuresError messages and tooltip textAny model that will be maintained by more than one personFunction 5: COALESCE — The Null HandlerWhat It DoesCOALESCE evaluates a list of expressions in order and returns the first one that is not BLANK or null.COALESCE(expression1, expression2, ..., expressionN)Why It’s Better Than IF(ISBLANK())Null handling in DAX is one of the most common sources of verbose, repetitive code. The standard pattern is:dax-- ❌ Verbose null handling (written by most developers)Safe Revenue =IF( ISBLANK([Total Revenue]), 0, [Total Revenue])For a single measure, that’s manageable. When you’re handling nulls across a dozen measures, it becomes noise. COALESCE reduces this to a single expression:-- ✅ Clean equivalentSafe Revenue = COALESCE([Total Revenue], 0)But the real power isn’t replacing IF(ISBLANK()). It's the ability to chain multiple fallback values.Real Business Use Case: Fallback Hierarchy-- Revenue with a clear priority fallback chain:-- 1. Use actual revenue if available-- 2. Fall back to forecast if actual is blank-- 3. Fall back to budget if forecast is also blank-- 4. Return 0 if nothing existsBest Available Revenue =COALESCE( [Actual Revenue], [Forecast Revenue], [Budget Revenue], 0)Try writing that with nested IF(ISBLANK()) calls:-- ❌ The nested IF version (don't do this)Best Available Revenue =IF( ISBLANK([Actual Revenue]), IF( ISBLANK([Forecast Revenue]), IF( ISBLANK([Budget Revenue]), 0, [Budget Revenue] ), [Forecast Revenue] ), [Actual Revenue])Four levels of nesting to express a simple priority chain. COALESCE does it in five lines.Real Business Use Case: Safe Division with Context-- Margin % that handles missing cost data gracefullySafe Margin % =DIVIDE( COALESCE([Gross Profit], 0), COALESCE([Total Revenue], BLANK()), -- Returns BLANK if revenue is also BLANK BLANK())Real Business Use Case: First Non-Blank Date-- Find the first available date in a date hierarchy-- (useful when data coverage is uneven across subsidiaries)First Available Date =COALESCE( CALCULATE(MIN(FactSales[OrderDate]), DimGeography[Region] = SELECTEDVALUE(DimGeography[Region])), CALCULATE(MIN(FactSales[OrderDate])), DATE(2020, 1, 1) -- Absolute fallback)Real Business Use Case: Multi-Source Data Blending-- Unit price from different sources, in priority orderEffective Unit Price =COALESCE( RELATED(DimProduct[OverridePrice]), -- Manual override first RELATED(DimProduct[ContractPrice]), -- Contract price second RELATED(DimProduct[StandardPrice]), -- Standard price third AVERAGE(FactSales[ActualPrice]) -- Average from transactions as last resort)This single measure encodes an entire pricing hierarchy that would otherwise require a complex nested IF structure or a separate pricing logic table.When to reach for COALESCE:Any null-handling that has more than one fallbackActual vs. forecast vs. budget priority chainsMulti-source data blending (override → contract → standard)Replacing nested IF(ISBLANK()) chainsSafe aggregations where missing data should return 0 vs BLANKPutting It Together: A Real Measure SetHere’s how these five functions work together in a single dashboard scenario — a financial performance report with dynamic behavior:-- 1. SELECTEDVALUE: Dynamic title showing active filtersReport Title ="Financial Performance — " &SELECTEDVALUE(DimDate[Year], "All Years") & " | " &SELECTEDVALUE(DimGeography[Subsidiary], "All Subsidiaries")-- 2. KEEPFILTERS: Benchmark that respects user slicersHQ Benchmark =CALCULATE( SUM(FactSales[Revenue]), KEEPFILTERS(DimGeography[Subsidiary] = "Headquarters"), ALL(DimDate[Month]))-- 3. GENERATESERIES: Growth scenario slicer-- (in a calculated table, not a measure)Growth Rate Scenario =GENERATESERIES(0.05, 0.30, 0.05)-- Creates: 0.05, 0.10, 0.15, 0.20, 0.25, 0.30Projected Revenue =[Total Revenue] * (1 + SELECTEDVALUE('Growth Rate Scenario'[Value], 0.10))-- 4. NAMEOF: Self-maintaining tooltipRevenue Tooltip ="Showing " & NAMEOF(FactSales[Revenue]) &" as reported. Excludes intercompany transactions."-- 5. COALESCE: Actual → Forecast → Budget fallbackBest Available Revenue =COALESCE([Actual Revenue], [Forecast Revenue], [Budget Revenue], 0)Variance vs Best Available =DIVIDE( [Total Revenue] - [Best Available Revenue], COALESCE([Best Available Revenue], BLANK()), BLANK())Six measures. Five functions. A dashboard that’s dynamic, maintainable, handles missing data gracefully, and tells users exactly what they’re looking at.Operational Lesson: The Hidden Cost of Not KnowingHere’s the lesson I keep seeing repeated across teams:A developer who doesn’t know COALESCE writes IF(ISBLANK()). A developer who doesn’t know SELECTEDVALUE writes three-function combinations. A developer who doesn’t know KEEPFILTERS writes a workaround that silently ignores the user’s slicer.Each workaround works. The dashboard ships. The business uses it.But six months later, the next developer inherits the model. They see 40 lines of nested IF statements and wonder why it’s structured that way. They change something that looks redundant. The measure breaks. Nobody knows why — because the original logic was a workaround for a problem the original developer didn’t know had a simpler solution.This is how technical debt accumulates in DAX. Not through bad intentions, but through incomplete tool knowledge.The five functions in this article won’t cover every scenario you’ll encounter. But they represent a category of knowledge — functions that make your intent explicit, your code readable, and your models easier for the next developer to maintain.That next developer might be you, eight months from now, looking at a model you haven’t touched since the last project ended. The cleaner you write it today, the faster you’ll understand it then.Vembry Fiska Senior Power BI Developer & Data EngineerI design and build Power BI models for mid-market companies.SEO keywords: Power BI DAX functions, SELECTEDVALUE Power BI, KEEPFILTERS DAX, GENERATESERIES Power BI, COALESCE DAX, advanced DAX tutorial5 Power BI DAX Functions You Didn’t Know Existed was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.