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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Anonymous
Not applicable

Modify R code before refresh for whole dashboard

Good morning guys,

I am fairly new with Power BI so I apologise if the question is too simple 🙂

I connected PowerBI and RStudio to query from Postgres and modify the dataset, in order to upload smaller datasets, which I use for visualisations.

 

I have now 4 different datasets, all with the same Source Query ( i.e. R code). I have noticed that it would be better for me to add one column in my last 2 datasets, and I can do it with a line of code in R. I am now wondering, is there a way to refresh all 4 datasets at once, AFTER modifying the underlying code? 

When starting the project I did "Get Data" only once and then selected the 4 dataframes I needed, but after loading the DATA the firt time it seems that I can only modify them one by one!?

So far I managed to modify them through the query editor, but I need to do it  one dataset at the time.

 

Thanks

 

 

1 REPLY 1
lbendlin
Super User
Super User

Power Query queries can reference each other.  Create one query with all the columns, then reference if needed.  Or use your "master"  query throughout.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.