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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
carlol
Helper IV
Helper IV

Icon FX -- Rules hard coded?

 

Is it possible to have the condional formatting (rules) defined by a field ; depending on the KPI , each has a differnt target , I want to apply condiontal formatting rule against the % defined by KPI's target

 

  • KPI 1 90% target
  • KPI 2 80% target 

It appears to only allow me hard code the rules, apply one rule to all 

 

iconfx.PNG

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@carlol , You can color measure and icon measure, but in that case you you need use icon measure as different value(column) and use conditional formatting on that using field value option

 

example

 

/////Arrow
Arrow =
var _change =[Net Sales YTD]-[Net Sales LYTD]
return
SWITCH (
TRUE(),
_change > 0, UNICHAR(9650),
_change = 0, UNICHAR(9654),
_change < 0, UNICHAR(9660)
)


/////Arrow Color
Arrow color =
var _change =[Net Sales YTD]-[Net Sales LYTD]
return
SWITCH (
TRUE(),
_change > 0, "green",
_change = 0, "blue",
_change < 0, "red"
)

 

 

UNICHAR - Tool for Custom Icon Formatting: https://www.youtube.com/watch?v=veCtfP8IhbI&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=50

 

https://exceleratorbi.com.au/conditional-formatting-using-icons-in-power-bi/
https://community.powerbi.com/t5/Desktop/FORMAT-icon-set-for-use-in-a-data-card/td-p/811692

https://exceleratorbi.com.au/dax-unichar-function-power-bi/

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
carlol
Helper IV
Helper IV

I cannot get it to display the arrow 

Am I doing something stupid?

Tried 

Arrow = VAR Down = UNICHAR(11167)
    VAR Up = UNICHAR(11165)
    VAR Side = UNICHAR(11166)
    RETURN
       IF(KPIData[%] < 0, Down, IF(KPIData[%]  > 0.1, Up, Side))
 
Arrow =
var _change =KPIData[%]
return
SWITCH (
TRUE(),
_change > 0, UNICHAR(9650),
_change = 0, UNICHAR(9654),
_change < 0, UNICHAR(9660)
)
 
Capture.PNG
carlol
Helper IV
Helper IV

Thanks , will take a look 

amitchandak
Super User
Super User

@carlol , You can color measure and icon measure, but in that case you you need use icon measure as different value(column) and use conditional formatting on that using field value option

 

example

 

/////Arrow
Arrow =
var _change =[Net Sales YTD]-[Net Sales LYTD]
return
SWITCH (
TRUE(),
_change > 0, UNICHAR(9650),
_change = 0, UNICHAR(9654),
_change < 0, UNICHAR(9660)
)


/////Arrow Color
Arrow color =
var _change =[Net Sales YTD]-[Net Sales LYTD]
return
SWITCH (
TRUE(),
_change > 0, "green",
_change = 0, "blue",
_change < 0, "red"
)

 

 

UNICHAR - Tool for Custom Icon Formatting: https://www.youtube.com/watch?v=veCtfP8IhbI&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=50

 

https://exceleratorbi.com.au/conditional-formatting-using-icons-in-power-bi/
https://community.powerbi.com/t5/Desktop/FORMAT-icon-set-for-use-in-a-data-card/td-p/811692

https://exceleratorbi.com.au/dax-unichar-function-power-bi/

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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