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
laras
Regular Visitor

Measure dates with if and now

Hi all,

 

Please help me I have this date column and I want to make a measure;

IF [date] < now THEN urgent ELSE not urgent

I tried to make a new measure with:

IF = NOW()>FIRSTNONBLANK(Sheet1[Date],Sheet1[Date]),"urgent","not urgent"))

But it still returns The syntax for ",' is incorrect

 

Pls help, thanks!

 

1 ACCEPTED SOLUTION
waltheed
Solution Supplier
Solution Supplier

The syntax of you measure as mentioned in this post is completely wrong. So you may have misspelled that in the post. 

Something like this would pass the syntax test. But I'm not sure if it gives you the expected result. 

 

Measure Name =
IF (
    NOW () > FIRSTNONBLANK ( Sheet1[Date], Sheet1[Date] ),
    "urgent",
    "not urgent"
)
Cheers, Edgar Walther
ITsmart BI and Analytics consultant

View solution in original post

2 REPLIES 2
waltheed
Solution Supplier
Solution Supplier

The syntax of you measure as mentioned in this post is completely wrong. So you may have misspelled that in the post. 

Something like this would pass the syntax test. But I'm not sure if it gives you the expected result. 

 

Measure Name =
IF (
    NOW () > FIRSTNONBLANK ( Sheet1[Date], Sheet1[Date] ),
    "urgent",
    "not urgent"
)
Cheers, Edgar Walther
ITsmart BI and Analytics consultant

Ah yes! Sorry my bad

 

This works perfectly, thank you!

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.