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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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/

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/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors