Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
Can any one please help me to apply conditional formating on below table. I have a data source like below.
I need to highlite the deals with yellow background color which comes under today date to first date of previous month i.e., Deal A comes under this category. Please help me to highlite deal a with yellow bg.
Deal | Closed Date | Today Date |
a | 1-Jan-23 | 7-Feb-23 |
b | 10-Jan-23 | 7-Feb-23 |
c | 1-Feb-23 | 7-Feb-23 |
d | 1-Jan-22 | 7-Feb-23 |
Solved! Go to Solution.
Hi @paw1 ,
Please try below steps;
1. below is my test table
Table:
2. create measure with below dax formula
Measure =
VAR _a =
SELECTEDVALUE ( 'Table'[Today Date] )
VAR _b =
SELECTEDVALUE ( 'Table'[Closed Date] )
VAR _day =
DAY ( _b )
RETURN
IF ( AND ( DATEDIFF ( _b, _a, MONTH ) = 1, _day = 1 ), "yellow" )
3. set conditional format background color for fields
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.
Hi @paw1 ,
Please try below steps;
1. below is my test table
Table:
2. create measure with below dax formula
Measure =
VAR _a =
SELECTEDVALUE ( 'Table'[Today Date] )
VAR _b =
SELECTEDVALUE ( 'Table'[Closed Date] )
VAR _day =
DAY ( _b )
RETURN
IF ( AND ( DATEDIFF ( _b, _a, MONTH ) = 1, _day = 1 ), "yellow" )
3. set conditional format background color for fields
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.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
68 | |
64 | |
52 | |
39 | |
26 |
User | Count |
---|---|
80 | |
57 | |
45 | |
44 | |
35 |