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

  • SEARCH
  • Home
  • 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 179843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:28:45+00:00 2026-05-11T14:28:45+00:00

I have a calculated measure in Analysis Services that returns the average daily revenue

  • 0

I have a calculated measure in Analysis Services that returns the average daily revenue for a location based on their last three periods. Periods are location defined lengths of time, so one location may close their periods monthly, and another may close their periods quarterly.

To return the average daily revenue I have a factPeriods table that returns the revenue for a period, and the number of days that contribute to the period. The following MDX returns the correct values at the location level, ([Measures].[Days In AR Charges]) / ([Measures].[Days In AR Days]).

The problem is when I roll up to higher levels, say I want to return the average daily revenue by state, the calculation is incorrect because it first aggregates the days contributing to the periods, then divides. I want the averaging to happen at the lowest level first, then to sum the results of the daily average revenue. Here is an example of what happens vs what I would like to happen.

Say I have only two locations, A and B. A closes monthly, B closes quarterly. The results for the last close are:

Location / Revenue / Days contributing to revenue

Location A / $3000 / 30 days Location B / $1800 / 90 days

Location A is generating $100/day revenue, Location B is generating only $20/day in revenue. My total should be $120 day. Instead, it would return $40/day. Here is what happens at the calculation level.

I would like the formula to be in pseudocode SUM(([Measures].[Days In AR Charges]) / ([Measures].[Days In AR Days]))

but it is actually giving me (SUM([Measures].[Days In AR Charges])) / (SUM([Measures].[Days In AR Days]))

Can anyone help me determine the appropriate formula to make this work as desired? It should end up being $100/day + $20/day, not $4800/120 days. I have a suspicious I may need to use descendants but I am not clear on exactly how I would use them, or if that is even the right direction to go.

  • 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. 2026-05-11T14:28:45+00:00Added an answer on May 11, 2026 at 2:28 pm

    Don’t use SSAS calculations if you can get the number you want in ETL or processing as it will perform better.

    In this case I would add a DSV calculation to do the division then allow SSAS to sum as normal.

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

Sidebar

Related Questions

I'm using SQL Server Analysis Services. I have a calculated member that, for now,
I have found Okapi Similarity measure can be used to calculated document similarity from
I want to have a model with calculated fields that I can apply sorting
I have a label that gets updated with values calculated from information received by
I would like to create a calculated measure that sums up only a specific
I'm creating Analysis Services cubes in Visual Studio BIDS, and have a question about
I have this scenario: WServer 2008, SQL Server 2005, MS Analysis services (SSAS), ISS7
I have created a calculated member that assigns customer type. The problem is that
I have calculated the average cyclomatic complexity for each of my class files. I
I have a measure called Sales which is calculated by Unadjusted Sales Adjustment X

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.