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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Brian874
Frequent Visitor

%of hours used vs % to target

Hi,

 

I am using the below for my analysis but want to create a red and green, situation where if the #leads to the total expected leads % is higher than the total hours used % then the column will show red. If the #leads to the total expected leads % is lower than the total hours used % then the column will show green

Brian874_0-1668167025549.png

 

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @Brian874 ,

 

You can try below two solution:

YOY char =
IF (
    ISBLANK ( [YOY] ) = FALSE (),
    IF ( [YOY] > 0, UNICHAR ( 9650 ), UNICHAR ( 9660 ) ),
    BLANK ()
)

or

YOY color =
SWITCH ( TRUE (), [YOY] > 0, "#0ec600", [YOY] < 0, "#c60000" )

vhenrykmstf_0-1669021733004.png

vhenrykmstf_1-1669021755922.png

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @Brian874 ,

 

You can try below two solution:

YOY char =
IF (
    ISBLANK ( [YOY] ) = FALSE (),
    IF ( [YOY] > 0, UNICHAR ( 9650 ), UNICHAR ( 9660 ) ),
    BLANK ()
)

or

YOY color =
SWITCH ( TRUE (), [YOY] > 0, "#0ec600", [YOY] < 0, "#c60000" )

vhenrykmstf_0-1669021733004.png

vhenrykmstf_1-1669021755922.png

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi @v-henryk-mstf  this, unfortunately, did not work as it came up as an error.....do I need to create a new column and then a measure?

amitchandak
Super User
Super User

@Brian874 , you need only color in font then you can create color based on the measure. But in this, you have to create a unichar measure and color . And use color measure in conditional formatting using field value option. Unichar measure as new value in visual 

 

 

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

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Power BI Header Change

Power BI Header Update

Read about the exciting updates for the Power BI forum.

Top Solution Authors