Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a table called 'Parking Data' and a column called 'Payment Total Amount'. I have null values in the column and I'd like to replace those null values with 0. I used the following DAX:
Parking Total Amount = IF(ISBLANK(SUM('Parking Data'[Payment Amount Total])), 0, SUM('Parking Data'[Payment Amount Total]]))
But when I press Enter, Power BI adds two additional parenthesis at the end of the expression like so:
Parking Total Amount = IF(ISBLANK(SUM('Parking Data'[Payment Amount Total])), 0, SUM('Parking Data'[Payment Amount Total]]))))
and gives me the following error:
The end of the input was reached.
Here is an image:
Solved! Go to Solution.
I'm still getting the same error unfortunately. But this worked:
Parking Total Amount = IF(ISBLANK(SUM('Parking Data'[Payment Amount Total])), 0, SUM('Parking Data'[Payment Amount Total]))
You have two square brackets at the end of the last column. Take out the extra one and it should be fine.
Parking Total Amount =
IF (
ISBLANK ( SUM ( 'Parking Data'[Payment Amount Total] ) ),
0,
SUM ( 'Parking Data'[Payment Amount Total] )
)
Using a variable is cleaner:
Parking Total Amount =
VAR _PayTotal =
SUM ( 'Parking Data'[Payment Amount Total] )
RETURN
IF ( ISBLANK ( _PayTotal ), 0, _PayTotal )
You still make it simpler using COALESCE
Parking Total Amount = COALESCE ( SUM ( 'Parking Data'[Payment Amount Total] ), 0 )
@HamidBee try this
Parking Total Amount = IF(SUM('Parking Data'[Payment Amount Total]) = Blank(),0, SUM('Parking Data'[Payment Amount Total]]))
I'm still getting the same error unfortunately. But this worked:
Parking Total Amount = IF(ISBLANK(SUM('Parking Data'[Payment Amount Total])), 0, SUM('Parking Data'[Payment Amount Total]))
@HamidBee you can use Variable as per below
Parking Total Amount = Var Totalpayment =
SUM('Parking Data'[Payment Amount Total])
RETURN
IF([Totalpaymnet] = BLANK(),0,[Totalpayment])
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.