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

Sum column (flag = 1) problem

Hello guys,

I'm facing a curious problem here with HANA. I have a simple Calculation View with only one proyection with a table as a source where I want to create a Calculation Column that will work as a flag and it will be 1 or 0 dependant of some contitions.

The problem comes when I try to sum this column because it not sums 1's it only display 1 or 0.

For example, I have this table with the FLAG_ACTIVE calculation column created:

Client Country FLAG_ACTIVE A USA 1 B USA 1 C USA 1 D USA 0 F CANADA 1 G

CANADA

0 H CANADA 0 I CANADA 1

The FLAG_ACTIVE is a INTEGER Calculated Column and in the semantic layer show a Sum as the aggregation method.

But if I try to check the results in the Data Preview, if I select Country and FLAG_ACTIVE, it gives me the following result:

COUNTRY FLAG_ACTIVE USA 1 CANADA 1

But it is wrong as USA should be 3 and CANADA 2

How can I archieve my requirement?

I have also tried to create another calculation view over this one to try to create another calculation column from the flag, but the result is the same, it doesn't aggregates, it only shows 1 or 0

Any tips?

Thank you very much

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 25, 2016 at 05:26 PM

    Hi Alejandro

    Are you checking in "RAW DATA" tab or "Analysis" tab. Pull only Country and Flag objects in Analysis tab. Do you see it aggregated ? If not, share a screenshot .

    Under "View Properties" of Calculation View, what is the "Data Category" ?

    Regards

    Anindya

    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.