Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8704

Filter in Calculation View

$
0
0

Hi,

 

my test scenario is the follows,

 

Table definition:

 

TESTTABLE3

YEAR integer

CITY varchar(20)

VALUE integer

 

 

into"TESTTABLE3"values (1999, 'SH', 100);

into"TESTTABLE3"values (1999, 'NY', -100);

intoTESTTABLE3"values (1998, 'NY', 200);

intoTESTTABLE3"values (1998, 'SH', -200);

 

 

And create the Calculation View based on the table:

Capture.PNG

The node Aggregation _1 defined with the filter as follows:

Capture.PNG

 

And the Aggregration node before Sematics just forwards the fields to the output.

 

As I only want to see the positive total, the filter "VALUE" >= 0 set in the Aggregation_1 node.

 

If I run the query

 

SELECT"CITY", SUM("VALUE") AS"VALUE"

"_SYS_BIC"."CV_TESTTABLE3"

where"YEAR" < 2000

BY"CITY"

 

and try to see before year 2000 which city has total sold value greater than 0, I get the following result:

Capture.PNG

Actually I expect to get only the NY, because SH has the total value -100 and should be eliminated by the filter.

I checked the Viz Plan and saw the filter is performed on the table layer but the attribute YEAR is still brought to the top level of the processing by HANA, and it is not necessary and even lead to wrong result in this case!

 

What is the solution of this requirement? In real scenario I have more columns and don't know which columns will be selected to display and which columns will be selected as filter in the front end tool by the user.

 

Thanks in advance.

Hai


Viewing all articles
Browse latest Browse all 8704

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>