Forum Discussion
Future Date Filtering
- 5 years ago
Hi Anonymous ,
As my previous note in the formula, you can use today() function to replace the specific date in the formula:
Measure = IF ( SELECTEDVALUE ( 'Table'[Date] ) >= EDATE ( TODAY(), 3 ) && SELECTEDVALUE ( 'Table'[Date] ) <= EDATE ( TODAY(), 6 ), 1, 0 )Result:
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
As my previous note in the formula, you can use today() function to replace the specific date in the formula:
Measure =
IF (
SELECTEDVALUE ( 'Table'[Date] ) >= EDATE ( TODAY(), 3 )
&& SELECTEDVALUE ( 'Table'[Date] ) <= EDATE ( TODAY(), 6 ),
1,
0
)
Result:
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks very much. I think this is now working exactly how i need it to. Out of curiosity how does the measure know to choose the month and not the day or year?
Also i can use the same measure to create another filter for date in the next 6-12 and 12-18 just by copying this measure and changing the 3 and the 6 to 6 and 12?
Thanks
Alex
- v-yingjl5 years agoCommunity Support
Hi Anonymous ,
"Out of curiosity how does the measure know to choose the month and not the day or year?"
This is how EDATE() works, it returns the date that is the indicated number of months before or after the start date. You can refer my first post link about this function which introduces it in details.
"Also i can use the same measure to create another filter for date in the next 6-12 and 12-18 just by copying this measure and changing the 3 and the 6 to 6 and 12?"
If the date is not above the power bi limitatio, you are right.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- Anonymous5 years agoNot applicable
Thanks very much this works perfect
- Anonymous5 years agoNot applicable
Hi,
I have just applied the following mesure for 12-36 months and it doesnt seem to be working. Does this have a limit on what months it can go from and to?