Forum Discussion

LABrowne's avatar
LABrowne
Icon for Helper II rankHelper II
2 years ago
Solved

DAX: How to register blank values as zero

Hi there,   I am currently working on a different formulas within my table on Power BI.   CALCULATE(SUM(OrderTable[Amount]),OrderTable[OrderTypeId] = 22 || OrderTable[OrderTypeId] = 24, OrderTab...
  • Arpitb12's avatar
    2 years ago

    You can use the IF and ISBLANK functions in Power BI to conditionally display "$0.00" when the result is blank. 
    Result = VAR TotalAmount = CALCULATE( SUM(OrderTable[Amount]), OrderTable[OrderTypeId] = 22 || OrderTable[OrderTypeId] = 24, OrderTable[IsDeleted] = False, OrderStatus[OrderStatusId] <> 7 ) RETURN IF( ISBLANK(TotalAmount), "$0.00", TotalAmount )