Forum Discussion
nbs33
Helper II
3 years agoOptimize DAX 12 MM Meausre
Hi, I have been struggling with this issue for a while. I am a fact table of about 2.5 million rows and multiple dimension tables, the largest being a cusotmer table of about 165,000 rows. I also...
amitchandak
Super User
3 years agonbs33 , the second one seems better, You can mark the join column as key column
try this one
rolling 12 =
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _min = date(Year(_max), month(_max) -12, Day(_max))+1
BLANK())
return
CALCULATE(SUM( Fact[Revenue]) ,DATESBETWEEN('Date'[Date],_min,_max))
Original Revenue 12MM =
CALCULATE( SUM( Fact[Revenue] ),
DATESINPERIOD(Dates[Date], LASTDATE(Invoice[ReportingDate]), -12, MONTH)
)