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
hervekoap
Regular Visitor

R script in PowerBi failed can't display the visual

Hi collegues

 

I am using R3-3.1 

 

I am adding a componound R and when I drag and drop a column ( InitialSidFrom)my R component says

 

hervekoap_0-1645646634120.png

 

What CAn I do to solve this issue?

 

thanks 

version powerbi :

Feedback Type:
Frown (Error)

Timestamp:
2022-02-23T20:07:13.2986533Z

Local Time:
2022-02-23T21:07:13.2986533+01:00

Session ID:
17d65b21-6f2d-4f61-8c75-cedae26cb01b

Release:
December 2021

Product Version:
2.100.1401.0 (21.12) (x64)

OS Version:
Microsoft Windows NT 10.0.14393.0 (x64 en-US)

CLR Version:
4.6.2 or later [Release Number = 394802]

Peak Virtual Memory:
51 GB

Private Memory:
1.09 GB

Peak Working Set:
1.28 GB

IE Version:
11.4350.14393.0

User ID:
30fcaed6-4c14-4033-b773-7cb9aee91e46

Workbook Package Info:
1* - en-US, Query Groups: 0, fastCombine: Disabled, runBackgroundAnalysis: True.

Telemetry Enabled:
True

AS Live Connection:
True

Performance Trace Logs:
C:\Users\CAUHH\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip

Enabled Preview Features:
PBI_compositeModelsOverAS
PBI_enableWebView2
PBI_sparklines

Disabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_SpanishLinguisticsEnabled
PBI_qnaLiveConnect
PBI_azureMapVisual
PBI_dataPointLassoSelect
PBI_dynamicParameters
PBI_enhancedTooltips
PQ_WebView2Connector
PBI_useModernFormatPane
PBI_scorecardVisual

Disabled DirectQuery Options:
TreatHanaAsRelationalSource

Cloud:
GlobalCloud

DPI Scale:
125%

Supported Services:
Power BI

Formulas:

 

 

What can I do to solve it ? 

 

 

 

 

 

5 REPLIES 5
hervekoap
Regular Visitor

I can not add a pbix file ...

 

here my excel::

hervekoap_0-1646131368542.png

 

and the pbix source ( R code) : 

 

# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:

dataset <- data.frame(Column1, Column2)
dataset <- unique(dataset)

# Paste or type your script code here:


require(gdata)
write.table(trim(dataset), file="e:/temp/r4.csv", sep = "\t", row.names = FALSE)
plot(dataset);
 
 

 

 

 

hervekoap_1-1646131568249.png

 

 

hervekoap
Regular Visitor

Hi Ibendlin

 

Here you will find the resul of my test 

 

my real goal is to export data through a R componoud

 

let me know if I am wrong

 

I am a beginner for the R componound

 

kind regards::::

 

# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:

dataset <- data.frame(Column1, Column2)
dataset <- unique(dataset)

# Paste or type your script code here:


require(gdata)
write.table(trim(dataset), file="e:/temp/r4.csv", sep = "\t", row.names = FALSE)
plot(dataset);

why do you call the file csv if you use tab as a delimiter ?  🙂

 

what's the point of using trim ?

 

This works fine for me.

 

write.table(dataset, file="c:/temp/r4.csv", sep = ",", row.names = FALSE)
hervekoap
Regular Visitor

Hi thanks for your feedback

 

I will do a simple case and  I will upload here as the original datas are private

 

regards

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to work with. Avoid posting screenshots of your source data if possible.

Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

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.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.