Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
LABrowne
Helper II
Helper II

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, OrderTable, OrderTable[IsDeleted] = False, OrderStatus[OrderStatusId] <> 7)
 
This works in adding up certain types of orders, doesn't sum deleted orders and removes orders that were cancelled.
 
The problem is sometimes it is returning blank values which is correct but how can I say if there values/sum ISBLANK = $0.00?
 
Any advice would be great!
 
Kind regards,
Luke
1 ACCEPTED SOLUTION
Arpitb12
Helper I
Helper I

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 )

View solution in original post

3 REPLIES 3
Arpitb12
Helper I
Helper I

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 )

Thank you a lot!

Jihwan_Kim
Super User
Super User

Hi,

Please check the link down below, and try to use it with your formula.

I hope this helps.


COALESCE function (DAX) - DAX | Microsoft Learn


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.