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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
matthewgoldring
Frequent Visitor

Number of DataRoles added

Hello, hoping someone could help.

 

Have created a custom vis and have set a dataRole that will take a minimum of 1 and maximum of 2 inputs.

 

I am wanting to have my R script change depending on whether I have 1 or 2 inputs. How can I access the dataRoles to check how many are there?

Or is there something I can add to an if statement in R to check how many inputs there are?

 

Thanks in advance!

 

Matt

2 REPLIES 2
matthewgoldring
Frequent Visitor

Hello, hoping someone could help.

 

Have created a custom vis and have set a dataRole that will take a minimum of 1 and maximum of 2 inputs.

 

I am wanting to have my R script change depending on whether I have 1 or 2 inputs. How can I access the dataRoles to check how many are there?

Or is there something I can add to an if statement in R to check how many inputs there are?

 

Thanks in advance!

 

Matt

v-viig
Community Champion
Community Champion

Please send this question to Power BI R Custom Visuals Support <pbircvsupport@microsoft.com>

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors