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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Filter a blank from a column

Hi All,
 
I am trying to filter a column of dates from the blank rows.
This is my DAX but it doesnt work. 

ColumnName =
VAR _test =
Contracten[Verwachte datum contract km bereikt] <> BLANK()

RETURN

IF (
DATEDIFF ( UTCTODAY (); _test; MONTH ) <= 4;
"EindContractKM ";
BLANK ()
)
 
Thank you
6 REPLIES 6
edhans
Super User
Super User

Try ISBLANK() instead of <> BLANK(). 

 

VAR _test =
ISBLANK(Contracten[Verwachte datum contract km bereikt])

 

 

Also, are you sure it is blank? You might want to read this article on blanks, nulls, empty (""), etc

 

EDIT: I didn't notice how you were using the variable later. I think @az38 has nailed the issue.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Anonymous
Not applicable

Hi @edhans, I tried this already and didnt get the right result

az38
Community Champion
Community Champion

Hi @Anonymous 

your _test variable returns BOOLEAN what that cannot be used as second argument in DATEDIFF()

what value do you need there?

whats your desired result for row with Contracten[Verwachte datum contract km bereikt] <> BLANK() ?


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

HI @az38 I would try the value (date) of the rows except the blank rows of  Contracten[Verwachte datum contract km bereikt] 

 

Regards,
Ezz 

az38
Community Champion
Community Champion

@Anonymous 

maybe it will be enough to try a simple version of yours statement? Like

ColumnName =
IF( 
Contracten[Verwachte datum contract km bereikt] <> BLANK() 
&& DATEDIFF ( UTCTODAY (); Contracten[Verwachte datum contract km bereikt]; MONTH ) <= 4;
"EindContractKM ";
BLANK ()
)

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

@az38  yes this works, Thank a lot 🙂

 

Regards,

Ezz

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors