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
omrdmr
Helper I
Helper I

Unicode Traffic Light indicator not showing on PBI desktop (Windows 7) and PBI Service

Hi,

 

I would like to display my measure as a unicode character to imitate traffic lights in my PBI report. I have two values to change the Unicode character between red, amber and green This can't be achieved by conditional formatting.

 

I've used the below formula in my measure but, can't get it display the colours properly. All I see is black squares.

 

Light = UNICHAR(if(AND([W_CY] >= 0, [W_CY] < 0.02), 128215, if(AND([W_CY] >= 0.02, [W_CY] < 0.025), 128210, 128213)))

where  W_CY is another measure.

 

I use windows 7. But a computer running windows 10 can display the colours properly.

PBI service also displays black squares.

What should I do to get this measure display colours as expected on Windows 7?

13 REPLIES 13
nehajadhav166
Resolver I
Resolver I

@TomMartens 

Where can I find Unicode value for orange lights?

Thanks,

Neha

Hey @nehajadhav166 ,

 

I get all the unicode I use from this site: HTML Unicode UTF-8 (w3schools.com)

 

Hopefully, this provides what you are looking for.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
TomMartens
Super User
Super User

Hey,

 

I have no idea about your Windows 7 question, but maybe I realized a little flaw regarding the UNICODE values. I think it should be:

128210 (yellow)

128213 (red)

128215 (green)

 

Regards



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Yes, you are right, I am using the same values. Just corrected the post.

Thanks.

@omrdmr,

 

Instead, you may specify Image URL in the Data Category or use conditional formatting.

https://community.powerbi.com/t5/Desktop/Workaround-a-for-Measure-to-return-a-URL/m-p/223598

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

Hi, @v-chuncz-msft,

 

As I said earlier, conditional formatting is not working for me. I have two data limits and need to display 3 colours based on the limits. As PBI Con formatting doesn't offer the same functionality in Excel, it doesn't work for me.

 

I've looked at the post you shared. Yes, you can display images using calculated columns but I couldn't get it to work. 

I tried to create a calc column using a formula like below one:

 

Image = 
VAR val = IF(ISBLANK(CALCULATE(SUM(Fact_Table[Total]), dCalendar[YTD], Fact_Table[Service]="ABC")), 0, 
	CALCULATE(
		DISTINCTCOUNT(Fact_Table[No]), 
		Fact_Table[RecordType]="i", 
		dCalendar[YTD],
		Fact_Table[Flag],
		OR(
			Fact_Table[Code]=1, 
			Fact_Table[Code]=2
		), 
		Fact_Table[Biz Service]="ABC"
	)
	/
	CALCULATE(SUM(Fact_Table[Total]), dCalendar[YTD], Fact_Table[Service]="ABC")
)
RETURN 
    SWITCH (
        TRUE (),
        Val <= 0.02, "https://www.google.com/favicon.ico",
        "https://www.microsoft.com/favicon.ico"
    )

I want to use this column in my table where I display colours for each month. But as val variable returned 0- where the same formula in my measure returned 0.02- all displayed Google's favicon.

 Capture.PNG

 

Do you think, I can get this to work with some changes? OR Cal column is not something I can use to display colours/images?

@omrdmr,

 

By selecting the Diverging box and specifying number -1, 0 and 1, you can just configure three colors for the current conditional formatting.

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

Hi @v-chuncz-msft,

 

I've tried this with a PBI consultant. We want to show certain colours: Red, Green and Amber. But when we select diverging it displays colours in the gradient style.

 

Regards

@omrdmr,

 

See the example attached.

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

 

Colors.PNGHi @v-chuncz-msft,

 

I've changed the conditional formatting as in the example. This is not I wanted it to display. Please see the image.

 

I want to make bg colour

  • Green, when the measure <2% for the month
  • Amber when the measure >=2% and <2.5% for the month
  • Red when the measure >=2.5% for the month

 

Your example works well when you don't have any target to change the colour based upon. But in my case, it is not flexible enough.

 

Regards

@omrdmr,

 

Currently, there is no more elegant way. Otherwise, you'll need to create a custom visual.

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

Thanks, @v-chuncz-msft. Probably we will not go for it due to the time constraint.

 

I wonder if anyone tried to display UNICHARs (128215, 128210, 128213) as colours on WINDOWS 7 in a measure like:

 

Light = UNICHAR(if(AND([W_CY] >= 0, [W_CY] < 0.02), 128215, if(AND([W_CY] >= 0.02, [W_CY] < 0.025), 128210, 128213)))

 

 If anyone achieved, please let me know.

 

Regards

 

I know this is an older post. But now powerbi allows for you to conditonally color items so you can use them for your RAG status. There are Unicode Differences between windows 7 and 8 and 10 so if you have a mixed environment this could be an issue and you would need to find a common ground between each of them. 

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.