Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
cm008507
Frequent Visitor

conditional formatting for monthly actuals based on monthly target where each row is a unique KPI

Hi there,  I am new to PoweBI desktop and attempting to creating a table with different KPIs in column 1 with annual target nalue in column 2, and actual monthly performance values for the fiscal year in the subsequent columns. 

 

I'd like to have conditional formating for each month's actual values based on the annual target value for each KPI.  As each row contains a unique KPI, the formatting rules will be unique to each row.   Thresholds and table layout shown below.

 

 RedAmberGreen/BestAmberRed
KPI1< 80%80% to 95%> 95%  
KPI2  <=0.200.20 to 0.25>0.25
KPI3  <= 4.54.5 to 4.6>4.6
KPI4  <= 4.54.5 to 4.6>4.6
KPI5< 60%60% to 80%80% to 100%101% to 105%>105%

 

KPI Name2022 TargetJan ActualFeb ActualMar Actual
KPI1 $                9.69 $        9.83 $       10.15 $    14.25
KPI20.210.260.190.21
KPI34.004.554.604.70
KPI4 $            211.00 $    175.00 $     225.00 $  210.00

 

What is the best way to do this?   Thank-you in advance.

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @cm008507 

I'm afraid there is currently no other better way, you have to apply conditional formatting column by column.

Example (conditional formating for column 'Jan actual')

formatting_Jan = 
SWITCH (
    MAX ( 'Fact Table'[KPI Name] ),
    "KPI1",SWITCH (TRUE (),[Jan_Actualvalue] < 0.8, "Red",[Jan_Actualvalue] <= 0.95, "#ffbf00",[Jan_Actualvalue] > 0.95, "light Green"),
    "KPI2",SWITCH (TRUE (),[Jan_Actualvalue] <= 0.20, "light Green",[Jan_Actualvalue] <= 0.25,"#ffbf00",[Jan_Actualvalue] > 0.25, "Red"),
    "KPI3",SWITCH (TRUE (),[Jan_Actualvalue] <= 4.5, "light Green",[Jan_Actualvalue] <= 4.6, "#ffbf00", [Jan_Actualvalue] > 4.6, "Red" ),
    "KPI4",SWITCH (TRUE (),[Jan_Actualvalue] <= 4.5, "light Green", [Jan_Actualvalue] <= 4.6, "#ffbf00",[Jan_Actualvalue] > 4.6, "Red"),
    "KPI5",SWITCH (TRUE (), [Jan_Actualvalue] < 0.6, "Red",[Jan_Actualvalue] <= 0.8, "#ffbf00",[Jan_Actualvalue] <= 1, "light Green",[Jan_Actualvalue] <= 1.05, "#ffbf00",[Jan_Actualvalue] > 1.05,"Red")
)

veasonfmsft_1-1659936040786.png

 

 

Best Regards,
Community Support Team _ Eason

View solution in original post

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi, @cm008507 

I'm afraid there is currently no other better way, you have to apply conditional formatting column by column.

Example (conditional formating for column 'Jan actual')

formatting_Jan = 
SWITCH (
    MAX ( 'Fact Table'[KPI Name] ),
    "KPI1",SWITCH (TRUE (),[Jan_Actualvalue] < 0.8, "Red",[Jan_Actualvalue] <= 0.95, "#ffbf00",[Jan_Actualvalue] > 0.95, "light Green"),
    "KPI2",SWITCH (TRUE (),[Jan_Actualvalue] <= 0.20, "light Green",[Jan_Actualvalue] <= 0.25,"#ffbf00",[Jan_Actualvalue] > 0.25, "Red"),
    "KPI3",SWITCH (TRUE (),[Jan_Actualvalue] <= 4.5, "light Green",[Jan_Actualvalue] <= 4.6, "#ffbf00", [Jan_Actualvalue] > 4.6, "Red" ),
    "KPI4",SWITCH (TRUE (),[Jan_Actualvalue] <= 4.5, "light Green", [Jan_Actualvalue] <= 4.6, "#ffbf00",[Jan_Actualvalue] > 4.6, "Red"),
    "KPI5",SWITCH (TRUE (), [Jan_Actualvalue] < 0.6, "Red",[Jan_Actualvalue] <= 0.8, "#ffbf00",[Jan_Actualvalue] <= 1, "light Green",[Jan_Actualvalue] <= 1.05, "#ffbf00",[Jan_Actualvalue] > 1.05,"Red")
)

veasonfmsft_1-1659936040786.png

 

 

Best Regards,
Community Support Team _ Eason

Thank-you for your assistance.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.