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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
jct999
Advocate II
Advocate II

DirectQuery + composite model : What can be done ?

Hello

I'm going to build the following composite data model:


From 2 fact tables:

Fact_Table_1: Storage mode = DirectQuery, more than 10M rows
Fact_Table_2: Storage mode = Import, 1K lines

Create a GLOBAL_FACT_TABLE table which is the UNION of Fact_Table_1 and Fact_Table_2.
(Fact_Table_1 and Fact_Table_2 have the same columns and data types)

 

Then set up a star schema based on GLOBAL_FACT_TABLE with 4 dimension tables around: Dimension_Table_1
, Dimension_Table_2, Dimension_Table_3, Date_table.

 

Finally, create measures based on GLOBAL_FACT_TABLE and the 4 dimension tables.

 

Here is the described schema:
Capture d’écran 2021-11-28 203104.png

 

Is it possible ? I mean, is the DirectQuery + Composite model as magical as we could expect: can we make full use of some measures based on GLOBAL_FACT_TABLE without worrying about what's behind it to fetch the data from Fact_Table_1 and Fact_Table_2 ?

 

If not, what are the limitations?

 

Thanks and Regards

2 REPLIES 2
AlexisOlson
Super User
Super User

I think @lbendlin is correct. You can't union the tables without loading Fact_Table_1 into your model.

 

One possible solution is to have both fact tables hooked up to the same dimension tables and define your base measures like this

SumSales = SUM ( Fact_Table_1[Sales] ) + SUM ( Fact_Table_2[Sales] )

This abstracts away the separation for any higher-level measures that depend on such base measures.

lbendlin
Super User
Super User

When you do the UNION you are creating a new calculated table in memory, which will not be very different from having both of your fact sources in Import Mode.  Not sure that is even possible.

 

Have you considered using Aggregations instead?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.