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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Buyer_JC78
Regular Visitor

DAX Formula including blank cells

I'm looking for some help to return a "Yes", "No" value in PowerBI. I need to identify if my payment date is greater than 60 days (Yes). However, some of the cells are blank and the formula I'm using below is coming up with errors. Is there a better formula or a way to deal with the blank cells so that they return as "Yes", i.e. greater than 60 days please?

 

>60 Days Overdue = IF(OR(AND([Paid Date]-[Invoice Date],[No. of Days to Pay]>=60), AND(BLANK ([Paid Date])), "Yes", "No")

2 ACCEPTED SOLUTIONS
BA_Pete
Super User
Super User

Hi @Buyer_JC78 ,

 

Try this measure:

 

 

>60 Days Overdue =
IF(
	(NOT ISBLANK([Paid Date]) && [Paid Date] - [Invoice Date] >= 60)
	|| (ISBLANK([Paid Date]) && TODAY() - [Invoice Date] >= 60),
	"Yes",
	"No"
)

 

 

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

This might be slightly more reader-friendly:

>60 Days Overdue = 
VAR _Date = IF ( ISBLANK ( [Paid Date] ), TODAY(), [Paid Date] )
RETURN
    IF ( _Date - [Invoice Date] >= 60, "Yes", "No" )

View solution in original post

3 REPLIES 3
BA_Pete
Super User
Super User

Hi @Buyer_JC78 ,

 

Try this measure:

 

 

>60 Days Overdue =
IF(
	(NOT ISBLANK([Paid Date]) && [Paid Date] - [Invoice Date] >= 60)
	|| (ISBLANK([Paid Date]) && TODAY() - [Invoice Date] >= 60),
	"Yes",
	"No"
)

 

 

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




This might be slightly more reader-friendly:

>60 Days Overdue = 
VAR _Date = IF ( ISBLANK ( [Paid Date] ), TODAY(), [Paid Date] )
RETURN
    IF ( _Date - [Invoice Date] >= 60, "Yes", "No" )

ARGH! Swooped by syntax! 😂



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors