Yes that will work as it retains the connection string from the .pbix file you upload. If you want to programmatically change the connection string (e.g. to switch between DEV/TEST/LIVE) then I believe this should help?
https://msdn.microsoft.com/en-us/library/azure/mt711505.aspx