Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi ,
I have forecast revenue for 12 months for current year. I have revenue from business central. Need to change the color of the value font where forecast revenue is less than revenue then it should be red color and forecast revenue greater than revenue it should be green color. Forecast revneue table has month name and Forecast revenue . Revenue column has Date table.How to make this one?
Since 2024 is current year need to change the color only for 2024. Thanks in advance.
Solved! Go to Solution.
Hi @Hari77
Thank you very much Ajithkumar_03 and lkalawski for your prompt reply.
For your question, here is the method I provided:
Here's some dummy data
Create a measure.
Measure =
VAR ForecastRevenue = SELECTEDVALUE('Table'[Value])
VAR Revenue =
CALCULATE(
AVERAGE('Table'[Value]),
FILTER(
ALL('Table'),
'Table'[Year] = 2024
)
)
RETURN
IF(
SELECTEDVALUE('Table'[Year]) = 2024
&&
ForecastRevenue > Revenue,
"Green",
IF(
SELECTEDVALUE('Table'[Year]) = 2024
&&
ForecastRevenue < Revenue,
"Red"
)
)
Step 1:
Step 2:
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Hari77
Thank you very much Ajithkumar_03 and lkalawski for your prompt reply.
For your question, here is the method I provided:
Here's some dummy data
Create a measure.
Measure =
VAR ForecastRevenue = SELECTEDVALUE('Table'[Value])
VAR Revenue =
CALCULATE(
AVERAGE('Table'[Value]),
FILTER(
ALL('Table'),
'Table'[Year] = 2024
)
)
RETURN
IF(
SELECTEDVALUE('Table'[Year]) = 2024
&&
ForecastRevenue > Revenue,
"Green",
IF(
SELECTEDVALUE('Table'[Year]) = 2024
&&
ForecastRevenue < Revenue,
"Red"
)
)
Step 1:
Step 2:
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Hari77 ,
You can use conditional formating here.
use the following steps to achieve.
Create one measure like Sameperiodlast year
Then create measure called Conditional formating(CF)
Then apply conditionlal formating
Best Regards,
Ajith Kumar
Did I answer your question? Mark my post as a solution!
I need to do only for current year. Forecast revenue Vs Actual revenue needs to be the comparison.Forecast > Actual the font red color, forecast < Actual the font green color . Actual revenue has last 3 years data .Need to do only for current year ,Please help me.
Forecast revenue and Revenue table is there. Forecast table has only Jan to Dec current year forecast revenue data . Revenue has current and last 2 years data . Need to write dax where Current year revenue less than Forecast revenue then red color font ,Current year revenue greater than Forecast revenue then red color font .Need to do this by checking Jan forecast vs Jan Revenue till December it needs to be compare for current year all months .How to do this in dax.
Hi @Hari77 ,
To add a dynamically changing font color, you need to create logic (a measure) that checks if one value is greater than the other.
Font Conditional =
If([Forecast Revenue] < [Revenue], 1, 0)Once you have that, you can use conditional formatting for font color and thus dynamically get the color to change.
| Resident Rockstar | Former Super User If I helped, please accept the solution and give kudos! Connect with me |
Forecast revenue and Revenue table is there. Forecast table has only Jan to Dec current year forecast revenue data . Revenue has current and last 2 years data . Need to write dax where Current year revenue less than Forecast revenue then red color font ,Current year revenue greater than Forecast revenue then red color font .Need to do this by checking Jan forecast vs Jan Revenue till December it needs to be compare for current year all months .How to do this in dax.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 49 | |
| 35 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 92 | |
| 75 | |
| 41 | |
| 26 | |
| 25 |