cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
laras Frequent Visitor
Frequent 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

Accepted Solutions
waltheed
Advisor

Re: Measure dates with if and now

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
Power BI User Group Netherlands
2 REPLIES 2
waltheed
Advisor

Re: Measure dates with if and now

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

Re: Measure dates with if and now

Ah yes! Sorry my bad

 

This works perfectly, thank you!