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

Summarize first, then Categorize

Started by MatusM, 04 Nov 2024 03:45:41 AM

Previous topic - Next topic

MatusM

Hi,

my data looks like:

AccountItemBalance
AlphaItem A1500
AlphaItem A2800
AlphaItem A31200
BetaItem B1900
BetaItem B21500
GamaItem G1100
GamaItem G2200
GamaItem G3200
GamaItem G4200

In Cognos (12.0.3) report crosstab, I need to categorize Accounts into:
- Top Accounts with total Balance > 1000 per Account
vs
- Long Tail with lower Balance.

I'm doing this by calculated field:

Category
if ([Balance] >= 1000)
then ('Top Account')
else ('Long Tail')


But I'm not able to instruct Cognos to summarize Items first, just then categorize the Accounts.
So the result is:

AccountItemBalanceCategory
AlphaItem A1500Long Tail
AlphaItem A2800Long Tail
AlphaItem A31200Top Account
BetaItem B1900Long Tail
BetaItem B21500Top Account
GamaItem G1100Long Tail
GamaItem G2200Long Tail
GamaItem G3200Long Tail
GamaItem G4200Long Tail


But outcome I need is this:

AccountItemBalanceCategory
AlphaItem A1500Top Account
AlphaItem A2800Top Account
AlphaItem A31200Top Account
BetaItem B1900Top Account
BetaItem B21500Top Account
GamaItem G1100Long Tail
GamaItem G2200Long Tail
GamaItem G3200Long Tail
GamaItem G4200Long Tail

How do I achieve it, please?
Thank you!

MFGF

Quote from: MatusM on 04 Nov 2024 03:45:41 AMHi,

my data looks like:

AccountItemBalance
AlphaItem A1500
AlphaItem A2800
AlphaItem A31200
BetaItem B1900
BetaItem B21500
GamaItem G1100
GamaItem G2200
GamaItem G3200
GamaItem G4200

In Cognos (12.0.3) report crosstab, I need to categorize Accounts into:
- Top Accounts with total Balance > 1000 per Account
vs
- Long Tail with lower Balance.

I'm doing this by calculated field:

Category
if ([Balance] >= 1000)
then ('Top Account')
else ('Long Tail')


But I'm not able to instruct Cognos to summarize Items first, just then categorize the Accounts.
So the result is:

AccountItemBalanceCategory
AlphaItem A1500Long Tail
AlphaItem A2800Long Tail
AlphaItem A31200Top Account
BetaItem B1900Long Tail
BetaItem B21500Top Account
GamaItem G1100Long Tail
GamaItem G2200Long Tail
GamaItem G3200Long Tail
GamaItem G4200Long Tail


But outcome I need is this:

AccountItemBalanceCategory
AlphaItem A1500Top Account
AlphaItem A2800Top Account
AlphaItem A31200Top Account
BetaItem B1900Top Account
BetaItem B21500Top Account
GamaItem G1100Long Tail
GamaItem G2200Long Tail
GamaItem G3200Long Tail
GamaItem G4200Long Tail

How do I achieve it, please?
Thank you!

Hi,

You can specify in the expression that you want to use the summary balance for each account, rather than the individual balance for each item. So your expression would be:

if (total([Balance] for [Account]) >= 1000)
then ('Top Account')
else ('Long Tail')

Cheers!

MF.
Meep!

MatusM