Forum Discussion
Highlighting new items
- 3 years ago
Hi Anonymous
I just used your code in the example file I created for you and it highlights in red anything that is more than 7 days in the past
You said you wanted to highlight things posted in the past 7 days, not more than 7 days ago?
To highlight things in the past 7 days you want to use greater than or equal to in the code, the code you posted is using less than or equal to
New = IF(SELECTEDVALUE('Issues'[Date Reported]) <= TODAY()-7, "red")
regards
Phil
Hi Anonymous ,
Please try below steps:
1. create a measure with below dax formula
Measure =
VAR cur_date =
TODAY () - 7
VAR cur_reportdate =
SELECTEDVALUE ( 'Table'[Date Reported] )
RETURN
IF ( cur_reportdate <= cur_date, "red" )
2. set the conditinal format for field background
For more details about , you can read related document: Apply conditional table formatting in Power BI - Power BI | Microsoft Learn
Please refer the attached .pbix file.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.