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
Anonymous
Not applicable

How do R script visuals encode characters in Power BI Online Services?

I'm having trouble with an R visual which correctly displays a pound sign, "£", when on my desktop. BUT, after publishing the report online all of the £ signs become "A£" (where the A has an accent).

 

I have tried using the unicode for £ sign "\u00A3" but the problem persists.

 

So my question is how does Power BI Online services envode characters from R scripts?

 

Bonus round:

 Why is it different from desktop?

 Does anyone have a solution?

 

Thanks,

 

Will

7 REPLIES 7
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

 

Based on your description, I think you have stored currency as text, right?
If this is a case, please check below link to know if you have used any unsupported libraries.

R packages in the Power BI service

 

In addition, you can also take a look at below document which told about how to create the r visual.

Creating R visuals in the Power BI service

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi,

 

Thanks for your reply, sorry I missed it until now. It looks like the package I am using, 'scales' is supported by Power BI. I'm using the function dollar_format(prefix = "£") to set the pound sign. Alas I haven't found any details in the documentation. 

 

This is a very frustrating issue! might just settle on GBP 😞

 

Thanks for your help,

 

Will

Hi @Anonymous,


I haven't found an effective solution to work through your issue, maybe you can try to submit a ticket for this or contact to power bi team...

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Might be a good idea, do you know how I raise a ticket / get in contact?

 

Thanks,

 

Will

HI @Anonymous,

 

>>Might be a good idea, do you know how I raise a ticket / get in contact?

You can check below link:

Power bi Support

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hey @Anonymous, did you end up getting a response or work-around for this? I'm having this same issue.

 

EDIT: https://community.powerbi.com/t5/Issues/R-script-visual-quot-quot-sign-error-only-after-publishing/idi-p/287838

Anonymous
Not applicable

Hi there,

 

I'm afraid I was never given a solution but it actually started working out of the blue one day..

I know that's not very helpful but I can let you know exactly what I'm using.

 

library(scales)

 

Currency <- "\u00A3"

Format <- dollar_format(prefix = Currency)

 

Formatted_Value <- Format(number)

 

and now that is working. Hope it helps,

 

Will

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.