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

View all the Fabric Data Days sessions on demand. View schedule

Reply
BSLATTER
Helper III
Helper III

Aggregated table/Composite model - filtering a dimension table by a disconnected table

Hello,

 

I have a data model that is
DirectQuery:

FactSales -> Sales Order transactions


Import:

FactSalesAgg -> Referencing FactSales, Group By on our DimAllTime_Key and SUM of LINEAMOUNT

*This import aggregated table then has 'Managed Aggregations' applied in order to act as the aggregate table for FactSales*

 

Dual

DimAllTime -> Calendar table (disconnected) that includes our fiscal calendar information

DimAllTime_InvoiceDate -> Calendar table joined to FactSales and FactSalesAgg on DimAllTime_Key = DimAllTime_Key (1:* relationship)

 

In our report we have users select a date from the DimAllTime calendar. We then use DAX measures to get the date selected + the related date last year (based on our fiscal dimensions)


Example for TY

Sales TY =
CALCULATE(
SUM(FactSales[LINEAMOUNT]),
DATESBETWEEN(DimAllTime_InvoiceDate[CALENDARDATE], [DateFrom_TY], [DateTo_TY])
)
 
DateFrom_TY =
CALCULATE(
FIRSTDATE( DimAllTime[CALENDARDATE] ),
ALLSELECTED( DimAllTime[CALENDARDATE] )
)
 
DateTo_TY =
CALCULATE(
MAX(DimAllTime[CALENDARDATE]),
ALLSELECTED( DimAllTime[CALENDARDATE] )
)
 
 
Plus equivalent three DAX measures for LY.
Sales LY =
CALCULATE(
SUM(FactSales[LINEAMOUNT]),
DATESBETWEEN(DimAllTime_InvoiceDate[CALENDARDATE], [DateFrom_LY], [DateTo_LY])
)
 
DateFrom_LY =
LOOKUPVALUE(DimAllTime[CALENDARDATE], DimAllTime[DayYear],

LOOKUPVALUE(DimAllTime[YEAR_DAY_IN],DimAllTime[CALENDARDATE], FIRSTDATE(DimAllTime[CALENDARDATE])) &"-"&
LOOKUPVALUE(DimAllTime[FISCALYEAR],DimAllTime[CALENDARDATE], FIRSTDATE(DimAllTime[CALENDARDATE]))-1
)
 
DateTo_LY =
LOOKUPVALUE(DimAllTime[CALENDARDATE], DimAllTime[DayYear],

LOOKUPVALUE(DimAllTime[YEAR_DAY_IN],DimAllTime[CALENDARDATE], LASTDATE(DimAllTime[CALENDARDATE])) &"-"&
LOOKUPVALUE(DimAllTime[FISCALYEAR],DimAllTime[CALENDARDATE], LASTDATE(DimAllTime[CALENDARDATE]))-1
)
 
 My expectation is that these Datefrom/DateTo calculations would be able to pass the expected DimAllTime_Key (from our DimAllTime tables) and hit the POwer BI aggregated table. Instead it appears to hit the DirectQuery - presumably because of the disconnected DimAllTime table being used as like a dynamic parameter.
 
Any idea how we can replicate this functionality - allowing a users selection to actually select multiple dates (for this and last year, or this and last time period X) while taking advantage of the imported aggregate table?
 
 
Both our DimAllTime tables follow a format like:
DimAllTime_Key CALENDARDATEFiscalYearDayInYear
36812/30/201920201
36912/31/201920202
3701/1/202020203
112/31/201820191
21/1/201920202
31/2/201920203

 

FactSales is similar to:

DimAllTime_KeyDimX_KeyDimY_KeyDimZ_KeyLineAmount
12312423123412354100
3239112412354200
365843394312354300
3231242312341235450
3239112412354350
3706584339431235425
3702312423123412354100
3239112412354200
265843394312354300
368231242312341235450
239239112412354350
406584339431235425

 

 

FactSalesAgg is similar to

 

DimAllTime_KeyLineAmount
1100
2300
31100
36850
239350
370125
4025
0 REPLIES 0

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.

Top Solution Authors
Top Kudoed Authors