Steve, but it does for me exactly what you are describing.

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

This will show last child member which has value in the next level of hierarchy. And with AGGREGATE you can alter the Measure you want to show up.

Hope [@Alessandro Marin] can provide more info.

Hi, Sergio!

There are some efforts in this field in the community. Have you seen this VSCode extension?

It supports COS highlighting for UDL sources and pretty much that's it.

But anyway it can be used for COS coding if you are OK with importing code to Caché manually and debugging Caché ObjectScript in the terminal.

For code importing/exporting I would recommend to try this tiny library: cache-udl.

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.