Forum Discussion
Table formatting
- 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.
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.
- RickWelfel5 years agoNew Member
This is what I am trying to state:
current week =VAR _today =TODAY () // get current dateVAR _oneweekago =LASTDATE(CALCULATETABLE(DATEADD ( 'Combined Schedule'[Start].[Date], -7, DAY ),ALL('Combined Schedule'[Start].[Date])))//get the date one week ago, e.g. today= 2021/6/21, then _oneweekago=2021/6/14RETURNIF (MIN ( 'Combined Schedule'[Start].[Date] ) >= _oneweekago&& MIN ( 'Combined Schedule'[Start].[Date]] ) <= _today,"Yellow")))))))Now its giving me an error of "The end of the input was reached".- v-xiaotang5 years agoCommunity Support
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.