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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
mrothschild
Continued Contributor
Continued Contributor

Virtual tables and not enough memory

Is there a more efficient way to program the following?  I'm getting error messages about not enough memory.

 

Table = 

VAR N = 100
VAR _Parent_Table = 
    ADDCOLUMNS (
        GENERATE(
            GENERATE(
                SELECTCOLUMNS ( GENERATESERIES ( 0, N , 1), "Equities", [Value] ),
                SELECTCOLUMNS ( GENERATESERIES ( 0, [Equities] , 1 ), "Public", [Value] )  
                ),             
            SELECTCOLUMNS( GENERATESERIES( 0, [Equities], 1 ) , "Private", [Value] )
        )
        ,
        "% Equity - Total",  [Equities] / N ,
            "% Equity - Public",  [Public] / N,  
            "% Equity - Private",  [Private] / N
    )

VAR _Child_Public_Table = 
    ADDCOLUMNS (
        GENERATE(
                     GENERATE(
                        _Parent_Table,
                        SELECTCOLUMNS( GENERATESERIES( 0, [Public], 1 ) , "S&P500", [Value] )
                    ),
                    SELECTCOLUMNS( GENERATESERIES( 0, [Public], 1 ) , "MSCI World", [Value] )
                )
        
        ,
        
            "% Equity - Public - S&P500",  [S&P500] / N,  
            "% Equity - Public - MSCI World",  [MSCI World] / N
 

    )

VAR _Child_Private_Table = 
    ADDCOLUMNS (
        GENERATE(
                     GENERATE(
                        _Child_Public_Table,
                        SELECTCOLUMNS( GENERATESERIES( 0, [Private], 1 ) , "Cambridge", [Value] )
                    ),
                    SELECTCOLUMNS( GENERATESERIES( 0, [Private], 1 ) , "TRPIEX", [Value] )
                )
        
        ,
        
            "% Equity - Private - Cambridge PE",  [Cambridge] / N,  
            "% Equity - Private - TRPIEX",  [TRPIEX] / N
 

    )

RETURN
_Child_Private_Table

 

The intended output is a new calculated table with 14 columns:

% Equity - Private

% Equity - Private - Cambridge PE

% Equity - Private - TRPIEX

% Equity - Public

% Equity - Public - MSCI World

% Equity - Public - S&P500

% Equity - Total 

Equities

Cambridge

MSCI World

Private

Public

S&P500

TRPIEX

1 REPLY 1
lbendlin
Super User
Super User

Not sure what you expect - you are raising 100 to the power of 7 (roughly, since you have some shorter runs).  That means  you ask to generate 100 trillion rows. Even one trillion rows would still be too much.

 

What's the goal behind this exercise?

Helpful resources

Announcements
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!

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 Solution Authors