cancel
Showing results for 
Search instead for 
Did you mean: 
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
Power BI User Group Netherlands

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
Power BI User Group Netherlands
laras
Regular Visitor

Ah yes! Sorry my bad

 

This works perfectly, thank you!

Helpful resources

Announcements
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors