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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.