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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
dd2909
Frequent Visitor

Hitting Agg Table with Disconnected Table

Dear experts,

I am using a direct query connection to a fact table that has 5 dimensions.

 

dd2909_0-1712697742269.png

I have successfully set up an aggregation table. The aggregation table sums the output of the fact table and is related to the dimensions directly. Using DAX studio, I can see I hit the aggregation table successfully for simple queries.

In the report, I use a matrix to return values from the fact table.

 

I am using a disconnected table and a measure to populate the matrix. The matrix uses the period names from the disconnected table as the column header and the measure are the values. The rows in the matrix are dimensions.

 

Measure to populate the matrix (edited to one period – the actual measure has several periods)

EDU_CALC_MATRIX =

//Save Selected Value from Matrix

VAR _SelVal = SELECTEDVALUE( EDU_Matrix[Period_Name] )

//Lookup Period Names

VAR CY_CE = LOOKUPVALUE(EDU_Matrix[Period_Name], EDU_Matrix[Period_Code], "CY_CE")

//Calculate Period Values

VAR _CY_CE = CALCULATE( [eduOutput], tblEDU_Periods[Period_Code] = "CY_CE")

RETURN

SWITCH( _SelVal,

       CY_CE, _CY_CE

)

 

The disconnected table allows for the user to use a slicer to add or subtract periods and add variance columns. The variance calculations (e.g. This Year vs Last Year, Q3 estimate vs budget) are not in the fact table. It also turns periods into relative references, so I do not have to update the label of the measure in the matrix (I change the table that lists the name of “CY_CE” to “2024 Current Estimate”). I tried using individual measures for each period (and it hit the agg table because it does not use the disconnected table), but this would require report-level maintenance and also may not allow users to add/subtract periods on demand.

 

In performance analyzer and DAX Studio, I can see queries that use the measure referring to the disconnected table for variance calculations do not hit the aggregation table.

 

In this case, the LOOKUP part of the measure for the period name does not hit the aggregation table, while the CALCULATE part does, I think.

Disconnected table misses (DAX studio, server timings):

 

dd2909_0-1712698001456.png

Fact table hits agg:

 

dd2909_1-1712698213639.png

 

This result makes sense because the disconnected table is not connected to the model, but is there a work around?

 

Is there a way to use a disconnected table for the measures and also hit the aggregation table?

 

I am not sure I can add the variance calculations to the fact table, given the variance calculation depends on the row context in the matrix.

 

Any thoughts? I appreciate your advice.

 

Thanks,

David

1 REPLY 1
Anonymous
Not applicable

Hi @dd2909 ,

The documentation describes the Agg table model with non-dependent relations:
User-defined aggregations - Aggregation based on GroupBy columns

And try rewriting the LOOKUPVALUE() part of the code using TREATAS() to see if you can hit the Agg table.
TREATAS – DAX Guide
Propagating filters using TREATAS in DAX - SQLBI

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors