Results 1 to 1 of 1

Thread: MDX Average Query

  1. #1
    Join Date
    Jun 2005
    Posts
    2

    MDX Average Query

    Hi

    I have been batteling to get the below right. I am fairly new to MDX but managing to keep my head above water.

    I am trying to get the average of the Due vs Delivery. What makes this more interesting is that not all the items have been delivered.
    Here is some sample information from the underlying fact table.

    Department Size Due Date Delivery Date Due vs Delivery Count
    01-Mens 0028 13/04/2006 13/04/2006 0 1
    01-Mens 0028 13/04/2006 13/04/2006 0 1
    01-Mens 0028 13/04/2006 NULL NULL 1
    01-Mens 0028 13/04/2006 NULL NULL 1
    01-Mens 0028 13/04/2006 NULL NULL 1
    01-Mens 0028 18/04/2006 NULL NULL 1
    01-Mens 0028 13/04/2006 12/04/2006 -1 1
    01-Mens 0028 13/04/2006 12/04/2006 -1 1
    01-Mens 0028 13/04/2006 12/04/2006 -1 1
    01-Mens 0028 13/04/2006 12/04/2006 -1 1

    I am trying to get to an answer where MDX sums the Due vs Delivery and Devides it by the lines that actualy contains some value and not null. The answer should come out to be -4/6 = -0.67

    Any help would be much appreciated
    Last edited by DJLMostert; 05-04-2006 at 01:54 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •