cancel
Showing results for 
Search instead for 
Did you mean: 

Analytic View Count in a Calculation View

Former Member
0 Kudos

Hi i have a problem with count measures. I have two analytic views and they count columns. The analytic views works perfect. Now i want to create a calculation view who compare these two analytic views. The problem is that the analytic views doesn't work in the calculation view.

The counted base columns are NVARCHARS.

What can i to compare this analytic views?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Matthias,

You must have done something wrong. In your analytic view, the measure should be marked as a measure, of aggregation type COUNT.

In your calc view, you should be using a projection node and not an aggregation node as you are doing right now.

Then it should work great. Make sure you mark the COUNT as a measure of type "SUM" in the calc view semantic node. Remember... when you aggregate COUNTs, you need to use aggregation type SUM!

John

Former Member
0 Kudos

Hello John,

my analytic view is as you say:

I rebuild the calculation view with projections:

But where can i choose the measure SUM? In the calculation view i can only select Attribute?

Thanks for your support!

Former Member
0 Kudos

I suspect in the later projection node you are projecting count as an attribute. Delete it from that node. Right click and select add as aggregate to output. Now you can select it as a measure and select aggregation type sum.

former_member182302
Active Contributor
0 Kudos

Click on the projection and convert it to "Aggregate" node.

Not sure why did you get a "projection" node when you have checked "Multiple dimension reporting" . This ideally wouldn't happen.

And in the "Aggregate" node keep it as a measure with aggregation type sum.

Regards,

Krishna Tangudu

Former Member
0 Kudos

So now its really strange. I closed the window and reopen it. Now i have in the lower projections a new column row.count. I added this to the union and now i can select Measure in the Semantic.

But now i get a error message on validation:

Creation of information view failed.

Cause: Dependent information views may not have been activated successfully.

former_member182302
Active Contributor
0 Kudos

Hi Mathias,

Do you have any calculated column in your analytic view? That extra field usually comes up when you have extra column?

Is your analytic view properly activated? Can you show the error message here?

Regards,

Krishna Tangudu

Former Member
0 Kudos

No i haven't a calculated column in the analytic views. I count only the rows.

Both analytic views are activated and working correct.

The error message:

former_member182302
Active Contributor
0 Kudos

Well your error message says row.count is missing from the AN_*_TOTAL view. can you once recheck and see if you have mapped it properly in the union node?

Former Member
0 Kudos

As you can see its mapped correctly.

What can be the problem? And why i have a row.count and Count column?

former_member182302
Active Contributor
0 Kudos

this issue is going in different directions. Would suggest you to "Redeploy" the analytic views and see after the redeployment if still you are seeing that row.count field?

And after that would rather suggest you to remove the analytic views and add them again in the projection and then map the columns to see if it works. And also check after again adding to the projection if the count is being added as VARCHAR or INTEGER.

Also i have doubts on how did you get into using "Projection" before semantics when you have choosen "Multi dimension reporting" it should ideally be "Aggregation" node.

Do convert the Projection node to Aggregation node.

Regards,

Krishna Tangudu

Former Member
0 Kudos

I have the Projection node because i convert it from aggregation?

I  checked and redeployed everything and furthermore i created a new CV but i get always the same error.

In the projection row.count is a Decimal

and count is VARCHAR

former_member182302
Active Contributor
0 Kudos

Hi Mathias,


The problem is that the analytic views doesn't work in the calculation view.

Can you elaborate this to understand the issue you are facing?

And also would want to know what kind of comparison are you doing? i.e are these both analytic views are similar in structure but representing different "Facts" like Actuals Vs Plan?

Or did you mean anything else?

Regards,

Krishna Tangudu

Former Member
0 Kudos

I try something with the SAP SFLIGHT example. I have two analytic views,  the first view count the bookings per Airlines total and the second one count bookings with departure from Frankfurt. So i count the SBOOKID (its a NVARCHAR) in both views. Now i want to calculate the proportion between the total bookings and the bookings from Frankfurt.

But in the calculation view the counting of the analytic views doesn't work.

former_member182302
Active Contributor
0 Kudos

Can you share your model details here and the error message you are getting while doing this?

Regards,

Krishna Tangudu

Former Member
0 Kudos

I didn't get a error message. The problem is that the counted column is a NVARCHAR and not a numeric column (Screenshot1).  But in the data preview of the analytic view it is a numeric column (Screenshot2)

former_member182302
Active Contributor
0 Kudos

Can you ping the "Semantics" screenshot as well?

Regards,

Krishna tangudu

Former Member
0 Kudos

Do you mean this one?

former_member182302
Active Contributor
0 Kudos

Click on "Semantics" and share that screen here.

Ideally "Count" you should have kept as a "measure" with aggregation type of "SUM". And i think that is the reason it is showing as numeric.

But why do u want it as a NVARCHAR again? you ideally wanted to get the counts right?

Former Member
0 Kudos

No i want it as a number but it is NVARCHAR.

So here in semantic i can only chose Attribute.

patrickbachmann
Active Contributor
0 Kudos

Mathias, even though it is NVARCHAR you should still be able to toggle the type on the left side of the semantics screen.  If you click in this cell does it let you choose?

Former Member
0 Kudos

i can only chose attribute. Only if its numeric i can chose measure.

I can't understand why the Column count its NVARCHAR. I want in the calculation view the output with AirlineName, Count_Frankfurt, Count_total

former_member182302
Active Contributor
0 Kudos

What i am surprised to see here is, in this model you do not have any "measures" and the "multi dimensional Reporting" is still checked. So i wonder how the view got activated?

Regards,

Krishna Tangudu