Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I have a table on my report and I'd like to apply some conditional formatting.
I have a series of rows for product, etc and columns for 'Month / Year'. The value is 'Sum of Sales'.
What I'd like to do is apply formatting on the value fields, where Month / Year is less than today's date, make the background colour yellow, otherwise, where it's today or greater, make green.
I can see there are rules that I can apply, but they seem to force expressions, where I just want a basic compare / if statement.
Can this be done? And if so, can you advise, please?
Many thanks,
Dayna
Solved! Go to Solution.
@Dayna , you can create a color measures and use that in conditional formatting using field value option
examples
Color Date = if(FIRSTNONBLANK('Date'[Date],TODAY()) <today(),"lightgreen","red")
Color Weekday = if(FIRSTNONBLANK('Date'[Weekday],blank()) in {"Sunday", "Saturday"},"lightgreen","red")
How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...
Color Weekday = if(weekday(max('Date'[Date]),2) >=6 ,"lightgreen","red")
Stunning solution, thank you!
@Dayna , you can create a color measures and use that in conditional formatting using field value option
examples
Color Date = if(FIRSTNONBLANK('Date'[Date],TODAY()) <today(),"lightgreen","red")
Color Weekday = if(FIRSTNONBLANK('Date'[Weekday],blank()) in {"Sunday", "Saturday"},"lightgreen","red")
How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...
Color Weekday = if(weekday(max('Date'[Date]),2) >=6 ,"lightgreen","red")
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
71 | |
57 | |
38 | |
36 |
User | Count |
---|---|
81 | |
67 | |
61 | |
46 | |
45 |