Average at day level with miltiselect queries ? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Average at day level with miltiselect queries ?

Is there a way to "capture" inside a calculated member the "current slice" ( whether it is a member or an agreggate of several members) ?<br /><br />Let’s suppose I’m building a generic member and I want to use that member in different MDX queries.<br />Sometimes the query will be cut for just one day, sometimes for a calculated member aggregating two o more days. What is called multiselect query.<br />And sometimes for example a member that is a month.<br /><br />The problem is the measure I’m trying to create must be able to calculate for example an average of a set of measures but at day level.<br />So I have to force the Avg ( SET , measure.some_measure) to the day level.<br /><br /><br />And I cannot force with descendants ( Date.currentmember , lowestlevel ) because with a calculated member which is the aggregate of two days it wont work.<br />For example member day12 = ‘ aggregate( day1<img src=’/community/emoticons/emotion-2.gif’ alt=’:d’ />ay2 ) ‘<br />I can’t do day12.children or descendants so I can’t force the average to the day level.<br /><br />So is there a way to generate an average of measures at DAY-LEVEL but in such a generic way that I can slice it with memebrs and calculated members ?<br /><br />