Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5959747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:43:43+00:00 2026-05-22T18:43:43+00:00

Not sure if this is the right place for MDX question but it seemed

  • 0

Not sure if this is the right place for MDX question but it seemed to be the most appropriate.

I have a question about MDX and the AVG function.

I would like to compute the average sale amount by day across several month for a year.

So I would like to compute the AVG of the 2010/01/01, 2010/02/01, 2010/03/01, etc… and this for everyday of the month.

Can anyone give me a hint on how I’d be able to do that ?

I would go for something that looks like this

WITH MEMBER [Measures].[Total] AS AVG(DESCENDANTS([Time].[2010], [Day]),[Measure].[Sale])

Thank you,

UPDATE

I have open a new question with a clearer explanation of my problem and study case.

Please find it at : MDX: avg advanced use

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T18:43:44+00:00Added an answer on May 22, 2026 at 6:43 pm

    You are on the right track. You can compute the average with:

    WITH
    MEMBER [Measures].[Average Sales] AS
        AVG(DESCENDANTS([Time].[Calendar].CurrentMember, 
                        [Time].[Calendar].[Date]), 
            [Measure].[Sale])
    SELECT
    {
        [Measures].[Average Sales]
    } ON 0,
    {
        [Time].[Calendar].[Month]
    } ON 1
    FROM [YourCube]
    

    This will give you the average for each member of the Calendar hierarchy of the Time dimension which you select. It will work for Years, Quarters, Months, etc and will average the Sale measure over days under the specified members. In your case you can just select Month on ROWS or COLUMNS as shown in the code sample.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Not sure whether this is the right place, but I have a question related
I'm not sure if this is the right place to post this question but
I'm not sure if this is the right place for this question, but here
I'm not entirely sure if this is the right place for this question, but
not sure if this is the right place to be asking but i have
I am not sure if that is the right place for this question but
I'm not sure this is the right place to ask the question but I
I'm not sure this is the right place but here I go: I have
I'm not sure if this is the right place to ask about hardware but
I am not sure whether Stackoverflow is the right place for this question, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.