Power BI - Data Cleaning with Power QueryWhich of the following is the correct syntax to replace blank values with zero in a calculated column using DAX?ANewColumn = ISBLANK([Sales]) ? 0 : [Sales]BNewColumn = IF([Sales] = 0, BLANK(), [Sales])CNewColumn = IF(ISBLANK([Sales]), 0, [Sales])DNewColumn = REPLACE([Sales], BLANK(), 0)Check Answer
Step-by-Step SolutionSolution:Step 1: Identify correct DAX syntax for replacing blanksThe IF function combined with ISBLANK checks if [Sales] is blank and replaces it with 0; otherwise, it keeps [Sales].Step 2: Evaluate other options for syntax errorsNewColumn = IF([Sales] = 0, BLANK(), [Sales]) replaces zeros with blanks, not blanks with zero. NewColumn = ISBLANK([Sales]) ? 0 : [Sales] uses incorrect ternary syntax (not valid in DAX). NewColumn = REPLACE([Sales], BLANK(), 0) uses REPLACE incorrectly (not for blanks).Final Answer:NewColumn = IF(ISBLANK([Sales]), 0, [Sales]) -> Option CQuick Check:Use IF(ISBLANK()) to replace blanks = A [OK]Quick Trick: Use IF(ISBLANK()) to replace blanks with values [OK]Common Mistakes:Using ternary syntax not supported in DAXConfusing blank with zeroUsing REPLACE function incorrectly
Master "Data Cleaning with Power Query" in Power BI9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepSheetTryChallengeScenarioRecallDash
More Power BI Quizzes Basic Visualizations - Why choosing the right visual matters - Quiz 13medium Basic Visualizations - Card and multi-row card - Quiz 12easy Data Cleaning with Power Query - Transpose operations - Quiz 3easy Data Cleaning with Power Query - Header promotion - Quiz 14medium Data Cleaning with Power Query - Removing duplicates - Quiz 5medium Power BI Basics and Architecture - Power BI Desktop vs Service vs Mobile - Quiz 5medium Power BI Basics and Architecture - Why Power BI is essential for business intelligence - Quiz 6medium Power BI Basics and Architecture - Power BI vs Tableau vs Excel comparison - Quiz 4medium Power BI Basics and Architecture - Power BI installation and setup - Quiz 4medium Power Query Editor - Filtering rows - Quiz 9hard