This project has moved. For the latest updates, please go here.

big difference in the speed of calculation of a calculated field

Aug 26, 2015 at 2:41 PM
Hello. Please tell me why the two calculated fields have different time calculation (more than 2 times). In my opinion they should not vary in speed:

SUM(MTD(StrToMember ('[Kalendar].[Kalendar].[Data_Sales].&['+format( DateAdd("yyyy", -1, now()), "yyyy-MM-dd" )+'T00:00:00]') ),[Measures].[Sales])

SUM(MTD(StrToMember ('[Kalendar].[Kalendar].[Data_Sales].&[2014-08-26T00:00:00]') ),[Measures].[Sales])
Coordinator
Aug 26, 2015 at 3:34 PM
This question doesn't seem to be a question about the OLAP PivotTable Extensions but just general MDX. The following would be better places to ask this:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlanalysisservices
http://stackoverflow.com/unanswered/tagged/ssas
Aug 27, 2015 at 12:59 PM
Thank you. You're right, the two MDX queries that use these calculated fields, performed various times. Apparently the compiler does not know that date can be calculated once for the entire query. And get today's date as a parameter from EXCEL impossible. :(