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

How to count distinct items with filtered condition?

Started by HenriP, 07 Jun 2021 03:00:42 AM

Previous topic - Next topic

HenriP

Hi

I have a problem creating a calculation in a cube dimension that should show how many items there are with a certain status.

I have used count( 1 within set "set") but this gives me the total number of items for every status. How could I filter the count so that it would only count the items with certain status?

MFGF

Quote from: HenriP on 07 Jun 2021 03:00:42 AM
Hi

I have a problem creating a calculation in a cube dimension that should show how many items there are with a certain status.

I have used count( 1 within set "set") but this gives me the total number of items for every status. How could I filter the count so that it would only count the items with certain status?

Hi,

I'm assuming Status is an attribute in the dimension?

You could try filtering the set using a filter() function before using this in your count()?

eg
count(1 within set filter([your set of members],[Your Status attribute] = 'Whatever Status you need'))

Cheers!

MF.
Meep!