Hi, Alessandro!

Let me simplify the question reducing the results as possible:

For this month MDX query:

SELECT NON EMPTY [Measures].[Amount Sold] ON 0,NON EMPTY [DateOfSale].[Actual].[MonthSold].&[201101] ON 1 FROM [HOLEFOODS]

I have:

 

 

But I want to see not 11,568.43, but the revenue got in the last day sale of January, like what I have for a day query:

SELECT NON EMPTY [Measures].[Amount Sold] ON 0,NON EMPTY [DateOfSale].[Actual].[DaySold].&[62122] ON 1 FROM [HOLEFOODS]

 

So I need the last available values for days but in a scope of months. Is it clearer now?

If you ask me why do I need that, it's much more evident with the example of stocks trading.

Consider you have a database of transactions of stocks trading for every day and you want to show in DeepSee the history of the price for some share the months' scale.

You would definitely want to use for the value of the price of the month the price of the last trading day of the month. Makes sense?

How to manage this in DeepSee? So I tried to put it in the scope of HoleFoods.

Finally, have the following for globals export/import in gzip:

// export gbl
set gbl="foo*D.GBL,boo*D.GBL"
set s=##class(%Stream.FileBinaryGzip).%New() do s.LinkToFile("1.xml.gz") do $System.OBJ.ExportToStream(gbl,s) do s.%Save() kill s
// gbl import
set s=##class(%Stream.FileBinaryGzip).%New() do s.LinkToFile("1.xml.gz") do $System.OBJ.LoadStream(s) kill s