cancel
Showing results for 
Search instead for 
Did you mean: 

Calculated measures in Analytical view

Former Member
0 Kudos

Hi,

i have DSO table from BW on HANA, and i want to create an Analytical View in HANA Studio. A simple representation of the table is:

CALDAYFILIALFILIAL CLUSTERREGION
20110701000110000010
20110702000120000800
20110702000210000010
20110703000330000020

The table has about 1.400.000 rows.

i want to calculate the measures:

M1 = Amount of Filial per Filial Cluster ( example: M1= 2, if cluster=1, M1=1 if cluster=2...)

M2= Amount of Filial per Region (example:  M2= 2, if rerion=0000010...)

The columns are defined as VARCHAR

I tried to calculate the measure, but there is no Aggregation type COUNT (sum works only with INT type)

Does anybody have any idea ?

Or should i create a calculation view with sql script instead?

Regards,

Vjola

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184768
Active Contributor
0 Kudos

Hi Vjola,

In Calc view there is an option to create Counters. You can define the Counter Key Figure with "Count Distinct" aggregation type and select the attribute by which you want to take the count.

Regards,

Ravi

Former Member
0 Kudos

Hi Ravi,

so i have to create a Calc. view, with Analytic view it's not possible to make it.

I have an other problem with this Anal. view.

i validated and activated without a problem but i cannot see the Data preview, with the error:

What should i do? do i need a privilege?

Thank you and regards,

Vjola

former_member184768
Active Contributor
0 Kudos

Hi Vjola,

Is this just a simple analytic view without any joins on attribute views / tables. The Invalid view shows that the view is not active. You mentioned that there was no issue with validation and activation of the Analytic view and even there is no grey icon next to the view in Content.

Can you please try to select some data from the Analytic view using SQL statement like

SELECT "RT_LOCATIO" from "_SYS_BIC"."ehg-test/FCLUSTER_POS_JOIN" group by "RT_LOCATIO";

Please check and correct the syntax to use the proper column names.

Regards,

Ravi

Former Member
0 Kudos

Hi,

it comes an error :

insufficient privilege: Not authorized: line 1 col 35 (at pos 34)

which privilege do a need?? is there any specific privilege to read BW tables ?

I can see he table content with SELECT * from "SAPBW3"."/BIC/AAAAD_CLT00" but in a view didn't work.

i have already given to my user lot of privileges. SYSTEM user has also no privilege for this statement.

Regards,

Vjola

former_member184768
Active Contributor
0 Kudos

Hi Vjola,

Can you please check if the _SYS_REPO user has privs to access the schema. Please refer to the following threads on data access issues.

http://scn.sap.com/thread/3153367

http://scn.sap.com/thread/3202647

Hope this helps.

Regards,

Ravi

Former Member
0 Kudos

the _SYS_REPO has access to my schema, otherwise i couldn't activate the View

That's why i cannon understand.

regards,

Vjola

0 Kudos

Hi

Me too getting the similar error when I tried to see data preview of my Analytic view.

Though, My validation and activating the view are thru.

If you have got it fixed, please share with me as what did you do to resolve it.

Thank you,

kind regards

K Sudhakaran