COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: HelloCognos on 29 Nov 2018 01:28:17 PM

Title: Mode Calculation in Relational Model 11.0.9
Post by: HelloCognos on 29 Nov 2018 01:28:17 PM
Hi, :) :)
Could you please help.

I have to calculate Mode for a # of rows. I'm using the below calculation but it seems like the #s that are generated are much larger than the Mode.
maximum(running-count([Time_Interval])).

Is there a good calculation code to use for calculating the Mode? 

Thanks a lot for your time!
Title: Re: Mode Calculation in Relational Model 11.0.9
Post by: rteruyas on 29 Nov 2018 02:29:52 PM
Let me know if this helps
http://www-01.ibm.com/support/docview.wss?uid=swg21687273
Title: Re: Mode Calculation in Relational Model 11.0.9
Post by: HelloCognos on 29 Nov 2018 06:01:29 PM
Thank you Ray, I appreciate the information.
Getting the below error.

XQE-PLN-0174 The column Duration must be contained in an aggregate function or the GROUP BY clause.
CAF-WRN-2082 An error has occurred. Please contact your administrator. The complete error has been logged by CAF with SecureErrorID:2018-11-29-17:59:

I'm trying couple of things.

Thanks
Title: Re: Mode Calculation in Relational Model 11.0.9
Post by: HelloCognos on 29 Nov 2018 06:04:07 PM
Duration Data item is as following,

case 
when  [STEP_TYPE] in ('TV Processing')  then
(_days_between([V_C_C],[V_C_O]) )
when  [STEP_TYPE] in ('Paper Processing')  then
(_days_between([A_C_1],[Q_B_1] ))
else
(_days_between([V_P_C],[V_P_OPEN]) )

end

Thanks
Title: Re: Mode Calculation in Relational Model 11.0.9
Post by: HelloCognos on 30 Nov 2018 06:41:23 AM
Issue resolved. I established a Detail Aggreg. so only one value is returned. Look good. Thanks so much!