Skip to Content
author's profile photo Former Member
Former Member

Query Design Problem

I have the following requirement:

Cube A has CHAR1, CHAR2, CHAR3, VALUE1, VALUE2, CALDAY

For a query I want:

Rows: CHAR1, CHAR2

Columns: VALUE1, VALUE2, X

X should be equal to the number of different occurences of CHAR3 (for each CHAR1, CHAR2 combination). I can have for the same CHAR1,CHAR2,CHAR3 combination a lot of records (with diferent CALDAY), but I only to count each different CHAR1,CHAR2,CHAR3 combination. For example with facts table:

A, B, C, 20, 10, 01.01.2008

A, B, D, 10, 20, 02.01.2008

D, E, F, 5 , 15, 01.01.2008

D, E, F, 10 , 20, 02.01.2008

G, H, I, 5, 20, 01.01.2008

The output should be:

CHAR1 CHAR2 VALUE1 VALUE2 X

A B 30 30 2

D E 15 35 1

G H 5 20 1

Can I do this with a query?

Tks

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 17, 2008 at 04:51 PM

    Problem is solved by adding a counter key figure X with exception aggregate on 0CALDAY.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.