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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.