28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Optional Step: Creating Calculated Columns<br />

The output of union, join, or projection view is stored under the Column node in the Output panel.To<br />

perform calculations on these columns, do the following:<br />

1. Right-click the Calculated Columns node.<br />

2. From the context menu, choose New.<br />

a. Enter the name.<br />

b. Select the data type.<br />

c. Enter the length and scale.<br />

d. To perform calculations on the output columns, do the following:<br />

○ If you know the formula, enter the expression to perform the calculation.<br />

○ From the list, select the required elements, operator, and functions.<br />

e. Choose Add.<br />

Optional Step: Applying Filter on Aggregation and Projection View Attributes<br />

1. Right-click the required attribute.<br />

2. From the context menu, choose Apply Filter.<br />

3. Select the required operator.<br />

4. Enter value.<br />

5. Choose OK.<br />

Note: You can edit a filter using filter expressions from the Output pane which provides you<br />

with more conditions that can be used in the filter including AND, OR, and NOT. For example,<br />

to retrieve the sales of a product where (revenue >= 100 AND region = India) OR (revenue<br />

>=50 AND region = Germany).<br />

Note: In order to define pattern-based filters in calculation views, you use the expression<br />

editor accessed by double-clicking the expression icon under the filter node of the Output<br />

panel. If you type<br />

match("ABC",'*abc*')<br />

the equivalent SQL is<br />

.<br />

where “ABC“ like ‘%abc%’<br />

Adding Attributes and Measures to Calculation View Output<br />

a. From the designer panel, choose the Output node.<br />

b. To add an attribute, from the context menu, choose Add as Attribute.<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Setting Up the Analytic Model<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved. 119

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!