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

(Relational) My PCT Caclulation and Error Related to Aggreg.Func

Started by gosoccer, 15 Jun 2017 12:25:51 PM

Previous topic - Next topic

gosoccer

Hi, :)PLS HELP!!

Please help if you can, I have to deploy to PROD today.

I'm getting an error on the following,
When verifying the Percentage Data Item, I get the below error since [Sold] has an Aggr. Func on it.

See below,

ERROR:
UDA-SQL-0213 The data type of an argument to an aggregate function is invalid.RSV-SRV-0042 Trace back:RSReportService.cpp(725): QFException: CCL_CAUGHT:

Data Items:

Percentage Data Item:
count(distinct[Sold] ) / total(count(distinct [Not Sold]+[Repaired]+[Restored]) for report)
Aggr Func: Automatic
Roll up Aggr. : Automatic

[Sold], [Repaired], [ Restored] looks like below
case when [TYPE] =1  and [STATUS]  in (1,2,3) THEN  [TRANS_ID] end

Aggr Func: COUNT DISTINCT
Roll up Aggr. : TOTAL

Thanks for your time. :)

Drisya

Since you have already taken distinct count for [Sold], [Repaired], [ Restored] the following should work.

[Sold]/( [Sold]+[Repaired]+[ Restored])