title: MDX named set with non empty last child
body: <p>I have a "Trend" dimension. The hierarchy is, Trend->Week->Day. The fact is linked to the "Day" key. There is no guarantee that measure value will exist for all days in a given week.</p>
  
  <p>When the user wants to see the measure at "Week" level, I need to show only the last empty day value for that Week. I have multiple measures and hence I ain't interested in creating a new calculated measure for each one of them (like <a href="https://stackoverflow.com/questions/120616/how-to-display-the-total-of-a-level-as-the-value-of-its-last-child-in-mdx">How to display the total of a level as the value of its last child in MDX</a>)</p>
  
  <p>Instead, is there any way to create a named set with which I can achieve the functionality as below?</p>
  
  <p><strong>Example</strong></p>
  
  <pre><code>Week    Day    Measure
  1       1      4
  1       2      5
  2       3      7
  2       7      9
  3       5      10
  </code></pre>
  
  <p>Should get at "Week" level as</p>
  
  <pre><code>Week    Day    Measure
  1       2      5
  2       7      9
  3       5      10
  </code></pre>
  
  <p>Thanks! :)</p>