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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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