title: MDX: Using named set in aggregate (last 7 days)
body: <p>I have built a DataCalculation dimension that should have a time based calculated. It should sum for each measure the last 7 day, parallel period etc. 
  I have built a named set for last 7 days: </p>
  
  <pre><code>CREATE  SET CURRENTCUBE.[Last 7 days]
  AS {
  StrToMember(Cstr("[Dmn_Dates].[date calc].&amp;["+
  Cstr(Format(Now(),"yyyy-MM-dd")) +"T00:00:00]"))
  :
  StrToMember(Cstr("[Dmn_Dates].[Date calc].&amp;["+
  Cstr(Format(Now()-7,"yyyy-MM-dd")) +"T00:00:00]"))
  };  
  </code></pre>
  
  <p>And then tried to use it on a calculated member: 
  create member currentcube.[Dmn_ DateTool].[Date Tool].[Last 7 Days_]
  as </p>
  
  <pre><code>aggregate(
  {
  StrToMember(Cstr("[Dmn_Dates].[date calc].&amp;["+
  Cstr(Format(Now(),"yyyy-MM-dd")) +"T00:00:00]"))
  :
  StrToMember(Cstr("[Dmn_Dates].[Date calc].&amp;["+
  Cstr(Format(Now()-7,"yyyy-MM-dd")) +"T00:00:00]"))
  }
  ,([Dmn_ DateTool].[Date Tool].[regular],measures.LeadCounter))
  , visible = 1; 
  </code></pre>
  
  <p>It doesn't work. What I get is a calculated memeber [Last 7 days] that show the same value as the regular value. </p>
  
  <p>Thanks reading until here. </p>