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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
psembaj
Frequent Visitor

KPI value is not displayed in the correct color

Hello! I am working with KPI vizualizaciones. I have tried different types of KPI visualizations, but in no achievement that the objective color changes to the correct color. My KPI is about one year sales, and I have created a quick measure with the month x month variation. The values are displayed correctly, but when the sales value of a month is lower than the previous month, it should be shown in red, otherwise in green. I share the link of my board.

I hope you can help me. I can not find where my error is.
Thank you!

 

https://drive.google.com/drive/folders/1l7_Y6TX1yPGK7FxPVUDxQJloN-cRVnZ1?usp=sharing

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

Hi @psembaj,

 

The KPI visual evaluates the Indicator value with Target Goals value and display color based on Color coding setting. See: https://docs.microsoft.com/en-us/power-bi/power-bi-visualization-kpi

 

In your scenario, as you would like to show green/red color when the sales value of a month is greater/lower than the previous month, you can create another measure to show previous moth sales and put it as Target Goals bucket, see: 

 

PREV_MONTH =
CALCULATE(
[PrecioTotal_USD_ACTUAL],
DATEADD('Calendario'[Date], -1, MONTH)
)

 

e1.PNG

 

Without using KPI visual, you could also set Conditional Formatting for the measure Diferencia USD_Con Mes Anterior in the table visual: 

 

e2.PNG

 

See attached pbix file. 

 

Best Regards,
Qiuyun Yu

 

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-qiuyu-msft
Community Support
Community Support

Hi @psembaj,

 

The KPI visual evaluates the Indicator value with Target Goals value and display color based on Color coding setting. See: https://docs.microsoft.com/en-us/power-bi/power-bi-visualization-kpi

 

In your scenario, as you would like to show green/red color when the sales value of a month is greater/lower than the previous month, you can create another measure to show previous moth sales and put it as Target Goals bucket, see: 

 

PREV_MONTH =
CALCULATE(
[PrecioTotal_USD_ACTUAL],
DATEADD('Calendario'[Date], -1, MONTH)
)

 

e1.PNG

 

Without using KPI visual, you could also set Conditional Formatting for the measure Diferencia USD_Con Mes Anterior in the table visual: 

 

e2.PNG

 

See attached pbix file. 

 

Best Regards,
Qiuyun Yu

 

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.