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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
kenneth_hess
Regular Visitor

Direct Query not refreshing when used within Union

We have two data sources setup in PBI.  One source is imported directly into PBI for historical data.  Another data source is using a direct query to get results from SQL (via on premise gateway) for today's data or live data.  We then created a union to merge the two tables together and present it as one table to the user. 

 

MergedTable = Union('history','live)

 

The problem we are having is that the direct query does not refresh automatically when the user refreshes the page.  If we add the live table to the dashboard as a new tile, it will refresh as expected.  the problem is that if used within the union it isn't refreshing without a full dataset refresh either from the web or the desktop application.

 

Please note:  Refreshing the entire dataset is not an option as it is quite large and takes about 20 mins to refresh.  We just need the direct query to refresh within the union to bring in live data.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@kenneth_hess , Have set up refresh for this table? - Please refer to Microsoft doc -

Calculated tables

You can add calculated tables to a model that uses DirectQuery. The Data Analysis Expressions (DAX) that define the calculated table can reference either imported or DirectQuery tables or a combination of the two.

Calculated tables are always imported, and their data is refreshed when you refresh the tables. If a calculated table refers to a DirectQuery table, visuals that refer to the DirectQuery table always show the latest values in the underlying source. Alternatively, visuals that refer to the calculated table show the values at the time when the calculated table was last refreshed.

 

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-composite-models

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@kenneth_hess , Have set up refresh for this table? - Please refer to Microsoft doc -

Calculated tables

You can add calculated tables to a model that uses DirectQuery. The Data Analysis Expressions (DAX) that define the calculated table can reference either imported or DirectQuery tables or a combination of the two.

Calculated tables are always imported, and their data is refreshed when you refresh the tables. If a calculated table refers to a DirectQuery table, visuals that refer to the DirectQuery table always show the latest values in the underlying source. Alternatively, visuals that refer to the calculated table show the values at the time when the calculated table was last refreshed.

 

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-composite-models

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Community Champion
Community Champion

@kenneth_hess This is a known issue because you are in composite mode. I'll try to dig up the technical explanation, I had it at some point. But, bottom line, this is expected behavior actually if my memory serves.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors
Users online (3,620)