Hi Thembelani!

Beautified your code a bit with code blocks.

To post code blocks highlighted do the following:

1. Paste the code

2. Select code and pick Formatted from Paragraph format. (Normal dropdown).

3. Pick Computed code from Block Styles (Styles dropdown).

Or, in the source mode (click Disable rich-text or click Source)  embrace code block with <pre><code> </code><pre> tags.

See details in this post.

Finally, I ended out with the following expression:

WITH  MEMBER [DateOfSale].[LastDayOfMonthRevenue] AS 'AGGREGATE([DateOfSale].[Actual].[MonthSold].CurrentMember.LASTCHILD,MEASURES.[Amount Sold ])

So if you looking to get the value for measure other than you have in context AGGREGATE would be helpful.

This approach is very useful e.g. if you want to show daily running total but for the monthly scope.

Thanks [@Alessandro Marin] for an extra DeepSee support session on GLobal Summit 17 Tech Exchange ;)

If I don't have control of this, who decides what is relevant?

Hi, Mike!

iKnow technology decides. iKnow analyses the article compares with all the rest articles in Community and makes the decision according to its algorithms and some settings and blacklists.  Actually, it's in beta state at the moment and sometimes it does irrelevant decisions. iKnow thinks that How to highlight Caché ObjectScript, work with htm, add image in the post and other questions article is relevant to your question at least by 30%. 

We would fix the algorithm in next DC version.