Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi All,
I would like to confirm if data model will be refreshed together along with the refresh of query even we never open Power Pivot UI.
I am thinking if I need to add the additional codes in my VBA command to refresh data model in Power Pivot after I refreshed my queries. There are additional calculation columns in my data models that I definitely need to make sure they are well refreshed
Hope someone could enlighten me, thank you
Sub RefreshAll()
'Disable background refresh
Dim lCnt As Long
With ActiveWorkbook
For lCnt = 1 To .Connections.Count
If .Connections(lCnt).Type = xlConnectionTypeOLEDB Then
.Connections(lCnt).OLEDBConnection.BackgroundQuery = False
End If
Next lCnt
End With
'Start refreshing all
Dim i As Integer
'Section for Queries
Dim queryNames(1 To 3) As String
Dim queryName As Variant
queryNames(1) = "Query - Dummy_1"
queryNames(2) = "Query - Dummy_2"
queryNames(3) = "Query - Dummy_3"
For Each queryName In queryNames
ThisWorkbook.Connections(queryName).Refresh
DoEvents
Next queryName
'Section for Data Models (I am not sure if I need to add this section)
Dim datamodelNames(1 To 3) As String
Dim datamodelName As Variant
datamodelNames(1) = "Dummy_1"
datamodelNames(2) = "Dummy_2"
datamodelNames(3) = "Dummy_3"
For Each datamodelName In datamodelNames
ThisWorkbook.Model.ModelTables(datamodelName).Refresh
DoEvents
Next datamodelName
End Sub
Not exactly sure what you are asking, but it is possible to refresh individual queries (tables) in a dataset, and even individual partitions in case your table has more than one.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
17 | |
10 | |
8 | |
8 | |
7 |