Skip to main content

Error Handling

 Formula errors are common. If you have a data set with hundreds of records, a divide-by-zero and an #N/A errors are bound to pop up now and then.

In the past, preventing errors required Herculean efforts. Nod your head knowingly if you’ve ever knocked out =IF(ISNA(VLOOKUP(A2,Table,2,0),"Not Found",VLOOKUP(A2,Table,2,0)). Besides being really long to type, that solution requires twice as many VLOOKUPs. First, you do a VLOOKUP to see if the VLOOKUP is going to produce an error. Then you do the same VLOOKUP again to get the non-error result.

Excel 2010 introduced the greatly improved =IFERROR(Formula,Value If Error). I know that IFERROR sounds like the old ISERROR, ISERR, and ISNA functions, but it is completely different.

This is a brilliant function: =IFERROR(VLOOKUP(A2,Table,2,0),"Not Found"). If you have 1,000 VLOOKUPs and only 5 return #N/A, then the 995 that worked require only a single VLOOKUP. Only the 5 VLOOKUPs returned #N/A that need to move on to the second argument of IFERROR.

Oddly, Excel 2013 added the IFNA() function. It is just like IFERROR but only looks for #N/A errors. One might imagine a strange situation where the value in the lookup table is found, but the resulting answer is a division by 0. If you want to preserve the divide-by-zero error for some reason, you can use IFNA() to do this.

A formula of =IFNA(VLOOKUP(),"Not Found") makes sure that you never see a #N/A error.

Of course, the person who built the lookup table should have used IFERROR to prevent the division by zero in the first place. In the figure below, the "n.m." is a former manager’s code for “not meaningful.”

The #DIV/0 error is changed to "n.m." by using =IFERROR(F9/E9,"n.m.")

Comments

Popular posts from this blog

Power BI Version Control

 # Power BI Version Control — What Microsoft Recommends (and Why It Matters) If you're developing Power BI content in a team, stop treating .pbix files like final artifacts. Start treating Power BI like a software product. ✅ Use .pbip (Power BI Project) instead of .pbix ✅ Integrate with Git for proper source control ✅ Work in feature branches ✅ Merge via Pull Requests ✅ Deploy across Dev → Test → Prod workspaces Why this shift? .pbix is a binary file. You can't diff it. You can't properly review changes. You can't merge it cleanly. .pbip is text-based and folder-structured, separating: Report metadata Semantic model definition DAX queries Settings and resources This enables: Version history tracking Code reviews CI/CD pipelines Automated validation Scalable team collaboration Modern BI teams should operate like engineering teams. Governance, branching strategy, environment promotion, and source control are no longer optional — especially in Microsoft Fabric ecosystems. ...

Why Every BI Professional Needs to Learn Agentic AI in 2026

Meta Description:  Agentic AI is transforming business intelligence. Learn why BI professionals must embrace autonomous AI agents to stay relevant — with practical examples, skills to build, and a BI Lead's honest perspective on the shift. Tags:   Agentic AI  ·  Business Intelligence  ·  Power BI  ·  AI Agents  ·  Data Analytics  ·  Future of BI  ·  Career Growth Let me be blunt: if you're a BI professional in 2025 and you haven't started paying attention to agentic AI, you're already behind. I'm not saying that to scare you. I'm saying it because I've spent over a decade building dashboards, tuning SQL queries, and wrangling Power BI data models — and nothing in my career has shifted the landscape as fast as agentic AI. Not self-service analytics. Not cloud migration. Not even the first wave of AI/ML. This is different. And here's why. What Exactly Is Agentic AI? Forget the chatbot hype for a second. Agentic AI refer...

Quantum Computing

  Quantum computing is a new kind of computing that uses the laws of quantum physics to solve certain problems much faster than classical computers.  It doesn’t replace your laptop but can tackle very complex simulations, optimization, and cryptography‑style tasks that are intractable for ordinary machines.  *** ### What is quantum computing? Quantum computing is a computing paradigm that uses quantum‑mechanical phenomena—like superposition, entanglement, and interference—to represent and process information in new ways. Instead of classical bits (0 or 1), quantum computers use **qubits**, which can be in a mix of 0 and 1 at the same time, enabling parallel computation.  *** ### Classical bits vs. qubits - A **classical bit** is either 0 or 1; operations are deterministic and sequential.  - A **qubit** can be 0, 1, or any quantum “blend” of both, written as $$ \alpha|0\rangle + \beta|1\rangle $$, where $$ \alpha $$ and $$ \beta $$ are complex numbers capturing p...