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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Anonymous
Not applicable

If date is after today

I'm trying to create a Measure that returns '1' if the date is after today and '0' if it isn't. The date field is called 'period_end_date' and it uses the default hierarchy of Year, Quarter, Month, and Day. The statement I am trying to use is:

Measure=IF(Table[period_end_date]>TODAY(),1,0)

 

but I keep getting the error: A single value for column 'proposal_end_date' cannot be determined. This can happen when a measure formula refers to a column that contains many values...

 

I've also tried: 

 

Measure=IF(Table[period_end_date].[Date]>TODAY(),1,0)

 

and I get: A single value for variation [Date] for column 'period_end_date' ... cannot be determined.

 

Thanks!

1 ACCEPTED SOLUTION
judspud
Solution Supplier
Solution Supplier

Hi @Anonymous 

 

What is your reason for using a measure rather than a column?

 

I have used similar code previously to create a column that identifies if the date is before today.

 

Try creating a column in the table 🙂

 

Thanks,

George

View solution in original post

3 REPLIES 3
kcantor
Community Champion
Community Champion

@Anonymous 

You are creating too broad of a measure which lacks the appropriate Row context within your data. @judspud is absolutely correct that a column will work. If the reason you prefer a measure is memory or storage, your field will only have two values, a 1 or a 0 and will compress nicely. There are ways to make a measure work but if you just want to flag dates after today, a column will be the best solution.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




judspud
Solution Supplier
Solution Supplier

Hi @Anonymous 

 

What is your reason for using a measure rather than a column?

 

I have used similar code previously to create a column that identifies if the date is before today.

 

Try creating a column in the table 🙂

 

Thanks,

George

In my use case, I am using a measure in order to calculate a cumulative forecasted total based on an average run rate and need to conditionally format the line based on the date - in other words, I would like to be able to make the line invisible (white) before today's date and colored after today's date. Thanks for any guidance!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.