cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid key figure error after reactivating analytic view

patrickbachmann
Active Contributor
0 Kudos

Hi folks,

I have an analytic view that has been working fine with no problems for months.  Recently I added a non numeric field to it and moved into production via IMPORT of delivery unit and began getting error below.  So I reverted back to original by importing the previous TGZ file before this change however I get the same error using original view.  My suspicion is that it is not working due to 68 upgrade yet this is the first time we have reactivated the view since upgrade and perhaps only reason it has worked post-upgrade is because we have never re-activated the view.

To elaborate more on the exact error;  we have a microstrategy report against the analytic view that is performing a SUM on a key figure that is NOT derived from the primary fact table of the analytic view.  In fact it's defined as an ATTRIBUTE (decimal data type) however the microstrategy developer was doing a SUM and converting it to a measure inside microstrategy.  This was working fine all along until I tried to change the view and/or activate the original. 

I was wondering if somehow it was related to new setting in 68 for analytic view 'Multidimensional reporting' option.  This seems to be checked by default which I was thinking it would mean we can not aggregate other metrics from non primary fact table.  But when I toggle this off and try I get the same error;

AP DBTech JDBC: [2048]: column store error: search table error:  [6900] Error executing physical plan: exception 6900:

AttributeEngine/Parallel/Aggregation.cpp:4502

Attribute engine failed; $function$=createAggregators; $message$=invalid keyfigure PRD:_SYS_SPLIT_MSEG~13en 0x00007f7680964be0

,in executor::Executor in cube: _SYS_BIC:production.

Now I can tell by the error it's searching for my metric inside a partition inside MSEG however this particular metric being summed truly does not exist in MSEG and is actually in EKPO table being joined inside the analytic view.  So how come HANA could resolve and find this field before however now after 68 it seems it can not?

Any ideas?

Thanks,

-Patrick

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Patrick,

Wish I could provide useful advice on the error, why it worked before, and why it doesn't work now. Not much I can add here.

However, my question is whether or not the developer validated that the numbers were correct from the KPI built on an aggregated dimension? I was 100% sure (am now 99% sure ) that HANA only calculates unique values of dimensions - much like fields in a GROUP BY - and thus would give incorrect results if used in an aggregation.

So, notwithstanding the HANA error - I'm tempted to say the KPI should be remodeled (likely via UCV and some other preceding logic to align dimensions).

Cheers

Jody

patrickbachmann
Active Contributor
0 Kudos

Hi Jody,

Actually they appear to be correct.  But what I had discovered is I had created a series of calculated measures that the Microstrategy developer was ignoring and essentially recreating the same formulas on the Microstrategy side.  So when I discovered he was doing these calculations and SUMMING them I asked him to use my calculated measures instead and we did not get any errors but we started getting an error on another date formatting function in the group by.  So I began to create a calculated column for that as well when we discovered that somehow after re-activating the view several times his original code just magically began to work again.  So we suspect something strange was happening in the code generation when the view is activated.  So to summarize, we fixed the problem by creating a new calculated column for date and rolled into production.  The microstrategy query is completely ignoring this new column yet everything magically is working again.  I'm completely baffled by this mystery and luckily I have a copy of the original view that I'm asking SAP to look into so we can understand what happened.

Thanks for your response.  Judging by the lack of responses I could tell it was definitely a strange issue that perhaps nobody has seen before.

-Patrick

patrickbachmann
Active Contributor
0 Kudos

Jody also I was told by Microstrategy developer that if they define anything as a measure the SUM automatically gets added to the SQL on their end.  ie: As the HANA developer if I don't want something summed in the analytic view I make it an attribute (ie: still numeric but not a measure).  Well if for example it is PRICE (doesn't make sense to aggregate) in Microstrategy I am told if they don't make it a measure then they can't perform any future formulas or calculations against it.  (ie: in HANA we can still create calculated columns on attributes but they can't in Microstrategy? Seems bizarre)  So if they wanted to take the PRICE and multiply it X 2 or something like that supposedly they can not if it's an attribute (maybe my friend Ravi will chime in here if this is true).

-Patrick

Answers (0)