This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
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?
Solved! Go to Solution.
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.
I was able to get the formula working but giving me a MIN function only accpets a column reference as an argument.
Hi @RickWelfel
in my sample,
MIN ( 'date'[Date] )
'date'[Date] is a column.
what do you put in function Min()?😅
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.
This is what I am trying to state:
Hi @RickWelfel
use:
current week =
VAR _today =
TODAY ()
VAR _oneweekago =
LASTDATE (
CALCULATETABLE (
DATEADD ( 'Combined Schedule'[Start].[Date], -7, DAY ),
ALL ( 'Combined Schedule' )
)
)
RETURN
IF (
MIN ( 'Combined Schedule'[Start].[Date] ) >= _oneweekago
&& MIN ( 'Combined Schedule'[Start].[Date] ) <= _today,
"Yellow"
)
FYI:
https://docs.microsoft.com/en-us/dax/all-function-dax
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.
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.
Thanks for the help. I am still having issues with typing VAR_Today, this is giving me an error.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 25 | |
| 23 | |
| 22 | |
| 17 | |
| 14 |
| User | Count |
|---|---|
| 25 | |
| 24 | |
| 20 | |
| 19 | |
| 19 |