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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! 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
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.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.