I have the code below to refresh Powerquery and one pivot chart. It works however I have to run twice to be able to refresh both items. Any suggestion how to fix this issue?
ActiveWorkbook.Connections("Query - qryAldiScanData").Refresh
' Application.Wait (Now + TimeValue("0:00:05"))