Forum Discussion
hvanstalle
5 years agoFrequent Visitor
Rolling average with variable measure
Hello, I created a Rolling average on our efficiency measurement and it works fine: CALCULATE(IF([Efficiency (%)]<>BLANK(), AVERAGEX( DATESBETWEEN( Datetable_months[Datum], DATEADD(varDat...
daxer-almighty
5 years agoSolution Sage
Please try to understand how variables in DAX work. Since DAX is a functional language, variables are really... CONSTANT. Once you've grabbed their values, they will never change throughout the execution of the code. So, doing calculate(varItem) = varitem. Always. There is no change here. By the way, a measure is always implicitly wrapped in CALCULATE, so doing this CALCULATE( [Measure] ) is the same as just calling the measure itself.
- hvanstalle5 years agoFrequent Visitor
Ok, thanks for your feedback.