Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

R Custom Power BI Visualization Variable Input Handling

I am trying to create a custom viz (scatter plot) with the ability to provide different options for colour and shape of the points using ggplot2.


My visualisation works fine when I specify both the Shape and Colour parameter, however, I want to be able to only supply one or the other down the road, not always both.


This is what my parameter options look like:



While my R script.r file for ingesting data is:



This is the error I get when I don't include Colour or Shape or both.



I feel that the ability to handle not supplying an argument should be handled within the script which I have tried to do. However, I am now stuck.






Helpful resources

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors