简体   繁体   中英

Aggregation last value and aggregation sum mdx mondrian

I would like to write two mdx queries with mondrian to analyze the stock. the first query is about exception last value aggregation and the second is about sum aggregation. below is my table of facts. Thank you.

my mdx:

with MEMBER [Measures].[STD LastValue]
AS ([Measures].[stock journalier],[Day].currentmember.lastchild) select [Measures].[STD LastValue] on columns from [stock analysis]

i want to know procedure to do that.

You may need to go up the hierarchy before applying LASTCHILD.

But also currentmember is related to the context of the SELECT clause. Try adding months to the ROWS of the select so that currentmember has a context.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM