Forum Discussion
Anonymous
7 years agoNot 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, a...
- 7 years ago
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
kcantor
Community Champion
7 years agoAnonymous
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.