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
Alex1602
Frequent Visitor

R package works offline but not online

Hi guys,

 

I`m having problems with a visualization which I have created with R. It perfectly works on my power bi desktop account , but when I want to see it at app.powerbi.de, I get an Script Runtime Error.

 

In particular, it is because the function make_datetime from R package lubridate is not found.

 

I would be very happy, if you could help me!

1 ACCEPTED SOLUTION
Alex1602
Frequent Visitor

Hi all,

 

No, there are no column names with unusual letters.

But I managed to get around this problem.

 

I used some other functions of lubridate.

Instead of make_date(), I used floor_date() to truncate date seconds. The problem then was, that it threw an error again, saying that a timezone had to be explicitly specified. Luckily lubridate also has a function for that: with_tz(). So my code for truncating the seconds became:

 

 lubridate::with_tz(lubridate::floor_date(TimeColumn, unit= "minute")), tzone = "GMT")

 

...Aaand it works 🙂

View solution in original post

3 REPLIES 3
Alex1602
Frequent Visitor

Hi all,

 

No, there are no column names with unusual letters.

But I managed to get around this problem.

 

I used some other functions of lubridate.

Instead of make_date(), I used floor_date() to truncate date seconds. The problem then was, that it threw an error again, saying that a timezone had to be explicitly specified. Luckily lubridate also has a function for that: with_tz(). So my code for truncating the seconds became:

 

 lubridate::with_tz(lubridate::floor_date(TimeColumn, unit= "minute")), tzone = "GMT")

 

...Aaand it works 🙂

Vicky_Song
Impactful Individual
Impactful Individual

 
v-haibl-msft
Employee
Employee

@Alex1602

 

Please check your table column name to see if there are non-English term. If exists, please rename to an English term and republish to see the result.

 

R package works offline but not online_1.jpg

 

Best Regards,
Herbert

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
Top Kudoed Authors