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

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
Join Arun Ulag at MPPC23

Join Arun Ulag at MPPC23

Get a sneak peek into this year's Power Platform Conference Keynote.

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors