Skip to Content
0

HANA Calculation view cound destinct combinations of columns

Apr 10, 2017 at 12:57 PM

63

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

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

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.

Share
10 |10000 characters needed characters left characters exceeded