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

Topcount

Started by Cognos8, 06 Apr 2010 12:02:32 PM

Previous topic - Next topic

Cognos8

I used topcount in c82 like this .... topCount( [Grp] ,10,[Cnt])

after migrating to c84 got the below error..

RSV-VAL-0010 Failed to load the report specification. QE-DEF-0478 Invalid coercion from 'string' to 'memberSet' for '[Grp]' in 'topCount([Grp],10,[Cnt])'.

did follow the below ibm kb ...
http://www-01.ibm.com/support/docview.wss?uid=swg21376464

No luck after applying this.

MFGF

Hi,

Some of the syntax checking in 8.2/8.3 was a little, um, lax, shall we say?  These builds would allow non-legal syntax - particularly with dimensional type expressions - that should really have been rejected as inappropriate.  The 8.4 release tightened up on this syntax checking, and as a result some folks have been encountering errors like yours when upgrading.

The error tells me that your [Grp] item is not a set of members but instead is a string value - this is where the issue lies.  Can you look at how [Grp] is defined in the report - is it also a query calculation? If so, how is it defined?  If you can post back the current definition, we can probably suggest how to recode it or convert it into a member set and make it all legal again.

Best regards,

MF.
Meep!

Cognos8

[Grp] - Which contains Case statement
Aggregate function  - Automatic
Roll up Aggregate funtion  -Automatic


[Cnt] = count(distinct[nbr])
Aggregate function  - Total
Roll up Aggregate funtion  -Automatic

By combining this two one dataitem is created with expression as

topCount([Grp],10,[Cnt])
Aggregate function  - Total
Roll up Aggregate funtion  -Automatic

Kindly let me know do you need any other information.

MFGF

Hi,

We need more info on how [Grp] is defined.  What values does the case statement return - individual members/sets of members/levels/attributes/captions/hard-coded strings etc?

To use it in a topCount function, it MUST return a valid member set.  If it's not possible to recode the CASE statement to return this, then we will need to look at manipulating the returned values into a set.  We can't do that unless we know what's already defined, though.

Regards,

MF.
Meep!

Cognos8

Hi ,

Answer for your question..

We need more info on how [Grp] is defined.  What values does the case statement return - individual members/sets of members/levels/attributes/captions/hard-coded strings etc?

Ans - It returns hard coded string or column value.

ex: case when [cmp] in '123' then 'IBM'
else [data item value]
end.

MFGF

Thanks,

Can you confirm what type of package you are using - either Relational (with Query Subjects and Query Items) or Dimensional (with Dimensions, Hierarchies, Levels, Members, Attributes and Measures)?

TopCount is a Dimensional function, designed to be used with Dimensional packages, and your reference to [data item value] has got me wondering if you're using a Relational package.

Thanks,

MF.
Meep!

Cognos8

it is relational model, In C82 this topcount functions showed as dimensional function (in function pane with exclamation mark) but my report works fine. But when you see funtion pane of  c84 it does not mentioned as dimensinal model function.

MFGF

Hi,

TopCount() is designed for use as a Dimensional function.  I very much doubt you will get it to work with a relational package in 8.4.

Sorry!

MF.
Meep!