Skip to Content
avatar image
Former Member

HANA Calculation view cound destinct combinations of columns

Hi

We are working on a calculation view where we need to provide a calculated measure that counts the destinct combinations of 3 columns.

Example:

Col. A Col B. Col C. Calculated column

21.04.2016 A X 1

22.04.2016 B X 1

23.04.2016 A X 1

In the example above it is easy to add a calculated column that just has the value 1 for each record. This works fine.

Our issue is when a 4 column is added that splits the records in more records.

Col. A Col B. Col C. Col D Calculated column

21.04.2016 A X TypeA 1

21.04.2016 A X TypeB 1

22.04.2016 B X TypeA 1

23.04.2016 A X TypeB 1

Now the result is incorrect as we would like it not to be influenced by Column D - The result should still be the same.

We have tried with different types of settings for exception aggregation but has not achieved to find this behaviour.

All advice will be appreciated.

/Chris

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Apr 13, 2017 at 07:24 PM

    Hi Chris,
    Try this scenario:
    1. Start with projection with 4 columns, lets call it "Projection1 - P1"
    2. Use "P1" for aggregation like the one in your first scenario, turn off column D, "A1"
    3. Create join "P1-A1" on col. A,B,C which takes columns ABCD from "P1" and calculated column from "A1"


    Mateusz.

    Add comment
    10|10000 characters needed characters exceeded