If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Error Message

Started by Tony, 07 Jan 2010 10:18:55 AM

Previous topic - Next topic

Tony

Hi All,
I am getting below error message when I used COUNT function on the field (COUNT(EMP_NUM)).

"BMT-MD-0003 RQP-DEF-0143 Invalid Object"

Any idea how to resolved this issue? Whenever I use any function like SUM, COUNT, MAXIMUM, etc I am getting same error.

I am using Cognos 8 Framework manager.
Thanks

DustPanMan

Tony,

Are you typing out the name of the field you want, or are you dragging it from the tree?  My first thought is that you need backets around your object name [EMP_NUM].

Best regards,

Dustin
Best,

D

Tony

#2
Quote from: DustPanMan on 07 Jan 2010 10:23:23 AM
Tony,

Are you typing out the name of the field you want, or are you dragging it from the tree?  My first thought is that you need backets around your object name [EMP_NUM].

Best regards,

Dustin

I am dragging it from the tree. Here is my expression COUNT[EMP_NUM]. Testing is fine. But when I closed Edit Definition box I am getting this error.

MFGF

Hi,

What kind of object are you trying to define using this expression - a calculation in a data source query subject, an item in a model query subject, a standalone calculation... ?

What is the exact expression you are using?  I'd expect it to be:

count([appropriate item from your query subject dragged into the expression here])

Can you give us more detail?

Thanks,

MF.
Meep!

Tony

Quote from: MFGF on 07 Jan 2010 10:30:32 AM
Hi,

What kind of object are you trying to define using this expression - a calculation in a data source query subject, an item in a model query subject, a standalone calculation... ?

What is the exact expression you are using?  I'd expect it to be:

count([appropriate item from your query subject dragged into the expression here])

Can you give us more detail?

Thanks,

MF.

I am just counting EMP_ID. EMP_ID is a table field. This is a simple calculation.

MFGF

Quote from: Tony on 07 Jan 2010 10:32:09 AM
I am just counting EMP_ID. EMP_ID is a table field. This is a simple calculation.

Is it a calculation in a data source query subject, an item in a model query subject, or a standalone calculation in a namespace or folder?

If you were dragging the item in from the tree, I'd expect it to be a fully qualified name, eg

count([Namespace].[Query Subject].[Query Item])

MF.
Meep!

Tony

#6
Quote from: MFGF on 07 Jan 2010 10:38:02 AM
Is it a calculation in a data source query subject, an item in a model query subject, or a standalone calculation in a namespace or folder?

If you were dragging the item in from the tree, I'd expect it to be a fully qualified name, eg

count([Namespace].[Query Subject].[Query Item])

MF.

Let's not elaborated qualified name any more ( it is good) and try to find out why error is displaying when function is used. As I earlier mentioned that whenever I use SUM, COUNT function, I am getting this error. My question is why I am getting this error once I used any FUNCTION. Without this function I am fine. If you have time you can try using this function on any number field.

MFGF

Hi Tony,

You still haven't given us enough information to help.

How are you creating this expression?  We don't need to know details sensitive to your business, but unless we know what you are doing to build this expression and where in the interface you are attempting to do this, we can't begin to guess at what may be causing the problem.  I'm afraid my clairvoyance classes didn't go well! :)

Is it a calculation in a data source query subject, an item in a model query subject, a standalone calculation in a namespace or folder, a calculation embedded into a SQL query...?

Where exactly are you dragging the item in from?  If it's not a fully qualified name, I'm not convinced you're picking it up from an appropriate place, but if you can't elaborate on at least the structure of the item name, it's difficult to be sure.

Any other info you can provide?

Thanks,

MF.
Meep!

Tony

Quote from: MFGF on 07 Jan 2010 11:19:41 AM
Hi Tony,

You still haven't given us enough information to help.

How are you creating this expression?  We don't need to know details sensitive to your business, but unless we know what you are doing to build this expression and where in the interface you are attempting to do this, we can't begin to guess at what may be causing the problem.  I'm afraid my clairvoyance classes didn't go well! :)

Is it a calculation in a data source query subject, an item in a model query subject, a standalone calculation in a namespace or folder, a calculation embedded into a SQL query...?

Where exactly are you dragging the item in from?  If it's not a fully qualified name, I'm not convinced you're picking it up from an appropriate place, but if you can't elaborate on at least the structure of the item name, it's difficult to be sure.

Any other info you can provide?

Thanks,

MF.

count[Name Space].[Query Subject].[Employee ID )

where Employee ID is created in a package with databse field (EMP_ID). I hope this will help you.

MFGF

Is it a calculation in a data source query subject, an item in a model query subject, a standalone calculation in a namespace or folder, a calculation embedded into a SQL query...?
Meep!

Tony

#10
Quote from: MFGF on 07 Jan 2010 11:31:39 AM
Is it a calculation in a data source query subject, an item in a model query subject, a standalone calculation in a namespace or folder, a calculation embedded into a SQL query...?

I do not know what is your questions. But COUNT[EMP ID], this calculation is applied on Query item under namespace.

MFGF

Just to clarify - it's a calculated query item within a query subject?

If you right-click the query subject and use 'Edit definition', does the dialog box for the query subject have a SQL tab and a Calculations tab (ie it is a data source query subject) or does it have a 'Query Subject Definition' tab (ie it is a model query subject).

When you bring the Employee number item into the expression of the calculation, is it being brought in from the same query subject or a different one?

Cheers!

MF.
Meep!

Tony

#12
Quote from: MFGF on 07 Jan 2010 12:24:34 PM
Just to clarify - it's a calculated query item within a query subject?

If you right-click the query subject and use 'Edit definition', does the dialog box for the query subject have a SQL tab and a Calculations tab (ie it is a data source query subject) or does it have a 'Query Subject Definition' tab (ie it is a model query subject).

When you bring the Employee number item into the expression of the calculation, is it being brought in from the same query subject or a different one?

Cheers!

MF.

Could you please advise me one what situation does this type of error comes?

MFGF

I want to try to understand exactly how you are creating the expression so I can try something similar at my end.  The error message on its own does not provide enough information to pinpoint what is causing it.

If you are creating this in a data source query subject, we can do some testing to see what SQL is being generated before you save the changes.  If you are doing this in a model query subject, we will need to trace the item back to its underlying data source query subject and see how it is being extracted from the database.

So - can you help by answering the question from the previous post?  Is it in a data source query subject or a model query subject.

Also, can you select the EMP-ID item in the tree pane on the left and tell me how it's Usage property and RegularAggregate property are defined?

MF.
Meep!

Tony

Quote from: MFGF on 08 Jan 2010 05:28:23 AM
I want to try to understand exactly how you are creating the expression so I can try something similar at my end.  The error message on its own does not provide enough information to pinpoint what is causing it.

If you are creating this in a data source query subject, we can do some testing to see what SQL is being generated before you save the changes.  If you are doing this in a model query subject, we will need to trace the item back to its underlying data source query subject and see how it is being extracted from the database.

So - can you help by answering the question from the previous post?  Is it in a data source query subject or a model query subject.

Also, can you select the EMP-ID item in the tree pane on the left and tell me how it's Usage property and RegularAggregate property are defined?

MF.
As I ealrlier mentioned that EMP_ID is a database field. I creat a query item (EMP ID) on this field. Now I want to count on EMP ID (query item). I use COUNT[EMP ID]. When I test it correct number is displaying. But when I closed edit definition box this error is appears.
By the way, could you tell me how to use SUM, COUNT function on Query item?
from my side, I am getting same error whenever i use any function on Query item or Data base field (I meant if I use COUNT[EMP_ID] or COUNT[EMP ID].) I hope this will help you.

MFGF

OK - so it's in a data source query subject?

what about the other questions I asked:

"can you select the EMP-ID item in the tree pane on the left and tell me how it's Usage property and RegularAggregate property are defined?"

What exactly are you trying to achieve by summing or counting EMP-ID?  If you define a calculation as you were doing previously - count([EMP-ID]) - it will return a single count of all distinct EMP-ID values and tag this value on every row of data in the query subject.  If instead you specify it as total([EMP-ID]) it will give you the sum of all EMP-ID values in the database, listed against each row.  Is this what you were intending to do?

If not, you should probably consider defining a calculation with an expression of 1.

Save the query subject, then select the new item and set it's Usage property to 'Fact' and it's RegularAggregate property to 'Count'.

This is based on pure guesswork on my part.  Unless you provide more information on what you are trying to do and how things are currently defined, I can't do more than guess at your intent.

MF.

Meep!

mtsaroucha

Hello,

I just encountered the same problem with count.

In my model, I have 3 namespaces:
"DB View"            -> contains the tables from my database (Oracle)
"Joins View"        -> contains query subjects and items based on the "DB View" and their relationships
"Business View"  -> contains query subjects and items based on the "Joins View". These query subjects are visible to the user.

In the "Business View" there is the query subject "Physicians" that among others, it contains the following items:
"Account Id", "Contact Id", "Prod Id", "Employee Id"
with the following characteristics:
Usage -> Identifier
Regular Aggregate -> Unsupported

We need to get the number of physicians grouped by Product, Employee and Account. Therefore, I tried to create a new query item "Physicians Num" (in the same query subject "Physicians") with the definition

count (  [Business View].[Physicians].[Contact Id] for [Business View].[Physicians].[Prod Id] , [Business View].[Physicians].[Employee Id] ,   [Business View].[Physicians].[Account Id]   )

All the items are dragged from the left side of the "Edit Definition Window".

However, when I try to save the new query item the following error message appears:
      "BMT-MD-0003 RQP-DEF-0143 Invalid Object "

It has to be mentioned that I tried to ommit the for part of the count function, but the same error occurs as well. I also modified the Usage and Aggregate Function of "Physicians Num" as mentioned in the previous post, but it didn't work either.

Could you please help me?

Thanks a lot,
M

MFGF

How about setting the expression to a value of 1 and setting it to be usage "Fact"? Does that work?

Regards,

MF.
Meep!

Lynn

Quote from: MFGF on 06 Mar 2012 04:32:31 AM
How about setting the expression to a value of 1 and setting it to be usage "Fact"? Does that work?

Regards,

MF.

I don't think that will work. When the SQL is generated you'd get 1 on each row of the result set and not for each physician in the database. For example, if your query had state and that fact item, you'd get the number 1 for each state rather than the count of physicians in those states.

It looks like Contact Id uniquely identifies a physician based on your count expression. Just set your new data item expression to the exact same as what Contact Id. Set the usage to fact and the aggregate property to count. You don't need to use the count function in the expression.

The scope aspect of the aggregation will be controlled by the granularity you define in your report (based on whatever other query items are included), not in FM.