1

I am trying to find the average value(val) for every month(1,2,3,4,...10) for a,b,c on the given cube below.

Here is my query:

select 
  ([Measures].[VAL1],[DIMPROPERTY TIME].[TIMEDIM].[MONTH])  on 0,
{[DIMPROPERTYLENDER].[Hierarchy].[NAME]} on 1

from [PropertyData2016]

I am pretty new to this, so any help is appreciated.

enter image description here

0

Have you read the msdn documentation and looked at the examples?

https://msdn.microsoft.com/en-us/library/ms146067.aspx

Edit: Try this.

WITH MEMBER Measures.[AVGSALE] AS 
AVG ( 
    DESCENDANTS(
          [DIMPROPERTYLENDER].[Hierarchy].[NAME],
          [DIMPROPERTY TIME].[TIMEDIM].[MONTH].ALLMEMBERS)        
          ), 
          [Measures].[VAL1]
    )

SELECT NON EMPTY Measures.[AVGSALE] ON 0, 
    NON EMPTY ([DIMPROPERTYLENDER].[Hierarchy].[NAME], [DIMPROPERTY TIME].[TIMEDIM].[MONTH]) ON 1

from [PropertyData2016]

PS: you might need to use [DIMPROPERTY TIME].[TIMEDIM].[MONTH].[MONTH] in your final select.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.