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
Irissie-2
Frequent Visitor

Undefined variables when using R visual

I am trying to build a visual with R, but I cannot use the variables I have in my datasets.

When I select the R visual and want to select which variables I want to use, they are undefined (I selected two, see below).

 

 

# 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(undefined, undefined.1)
# dataset <- unique(dataset)

# Paste or type your script code here:

 

 

Does anyone know why this happens?

 

I have built dashboards using PowerBI visuals with this dataset and these variables before, I just want to add a new visual to a page.

7 REPLIES 7
ranakashi007
New Member

I am facing the same issue and unable to find any solution.😐

Irissie-2
Frequent Visitor

Table columns

Are these table columns called "undefined" and "undefined.1" ? Are they maybe the result of a column split operation in Power Query?

No, they actually all have meaningful names, that also work in the visuals. It happens to all columns, in all tables. Maybe it has to do with a setting somewhere? But I don't know where to look..

There's only a single prompt to enable scripting when you set this up the first time.

 

Can't reproduce your issue.  Can you try with a fresh PBIX and some sample data?

Good point. I tried with example data and then everything was normal..

But on all of our own data (separate source data, separate PowerBI files) it doesn't work and shows undefined.1 etc.. 

lbendlin
Super User
Super User

when you say "variables"  do you mean table columns or measures?

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.