i got mdx query below returns average distinct count last 30 days , returns correct result, performance not , in fact table there 2,500,000 rows data everyday.
with member measures.dailyaverageuser avg ( existing{[date].[date].[date].members}, [measures].[active tiles employee id distinct count] ),format_string="##.000000" select measures.dailyaverageuser on 0, non empty([action targets].[name].children) on 1 [olap pre] ( {[target types].[name].&[tile]},{[employee statuses].[status id].& [1],[employee statuses].[status id].&[3],[employee statuses].[status id].&[4]}, {[business region].[abbreviation].&[none],[business region].[abbreviation].&[ams],[business region].[abbreviation].&[apj],[business region].[abbreviation].&[emea]},{[employee types].[bits].&[1],[employee types].[bits].&[5],[employee types].[bits].&[9],[employee types].[bits].&[25],[employee types].[bits].&[13],[employee types].[bits].&[29]},{[date].[date key].&[20150428]:null})
i changed query this, still same problem, thing 1 cache data between 20150409 :null, when query 20150410:null, fast.
with member measures.dailyaverageuser avg ( {[date].[date key].&[20150409]:null}, [measures].[active tiles employee id distinct count] ),format_string="##.000000" select measures.dailyaverageuser on 0, non empty([action targets].[name].children) on 1 [olap pre] ( {[target types].[name].&[tile]},{[employee statuses].[status id].&[1],[employee statuses].[status id].&[3],[employee statuses].[status id].&[4]}, {[business region].[abbreviation].&[none],[business region].[abbreviation].&[ams],[business region].[abbreviation].&[apj],[business region].[abbreviation].&[emea]}, {[employee types].[bits].&[1],[employee types].[bits].&[5],[employee types].[bits].&[9],[employee types].[bits].&[25],[employee types].[bits].&[13], [employee types].[bits].&[29]})
need suggestion on performance
do want keep in slicer axis? if not, can push member's definition -
with member measures.dailyaverageuser avg ( nonempty( ( {[target types].[name].&[tile]}, {[employee statuses].[status id].&[1], [employee statuses].[status id].&[3], [employee statuses].[status id].&[4]}, {[business region].[abbreviation].&[none], [business region].[abbreviation].&[ams], [business region].[abbreviation].&[apj], [business region].[abbreviation].&[emea]}, {[employee types].[bits].&[1], [employee types].[bits].&[5] ,[employee types].[bits].&[9] ,[employee types].[bits].&[25] ,[employee types].[bits].&[13] ,[employee types].[bits].&[29]}, {[date].[date key].&[20150428]:null} ), [measures].[active tiles employee id distinct count] ) , [measures].[active tiles employee id distinct count] ),format_string="##.000000" select measures.dailyaverageuser on 0, non empty([action targets].[name].children) on 1 [olap pre]
Comments
Post a Comment