Forum Discussion
RickWelfel
5 years agoNew Member
Table formatting
I have a table that shows data based on date range, is there a way to highlight or bold the date that is in a current week?
- 5 years ago
Hi RickWelfel
create the measure and put it in Background color of Values you want,
conditional format = VAR _today = TODAY () // get current date VAR _oneweekago =LASTDATE(CALCULATETABLE(DATEADD ( 'date'[Date], -7, DAY ),ALL('date')))//get the date one week ago, e.g. today= 2021/6/21, then _oneweekago=2021/6/14 RETURN IF ( MIN ( 'date'[Date] ) >= _oneweekago && MIN ( 'date'[Date] ) <= _today, "Yellow" )result:
See sample file attached bellow.
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution✔️ to help the other members find it more quickly.
v-xiaotang
5 years agoCommunity Support
Hi RickWelfel
create the measure and put it in Background color of Values you want,
conditional format =
VAR _today =
TODAY () // get current date
VAR _oneweekago =LASTDATE(CALCULATETABLE(DATEADD ( 'date'[Date], -7, DAY ),ALL('date')))//get the date one week ago, e.g. today= 2021/6/21, then _oneweekago=2021/6/14
RETURN
IF (
MIN ( 'date'[Date] ) >= _oneweekago
&& MIN ( 'date'[Date] ) <= _today,
"Yellow"
)
result:
See sample file attached bellow.
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution✔️ to help the other members find it more quickly.
RickWelfel
5 years agoNew Member
Thanks for the help. I am still having issues with typing VAR_Today, this is giving me an error.