Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count Distinct Totals via Category Count

Status
Not open for further replies.

griftr1

Programmer
Sep 1, 2004
8
US
I have a cube created via transformer which does a category count on supplier name. If I go into analysis studio and use the Supplier Count measure by country, everything works. It'll show something like:

United States - 100
Canada - 50
Mexico - 25
Total - 130

So I know that there are a total of 130 distinct suppliers being used across NA, some of them are used in multiple countries.

Now, if i want to determine the distinct number of suppliers used in just Mexico and Canada, it won't calculate the total properly. If I drag just Mexico and Canada into the Rows, it'll show this:

Mexico - 25
Canada - 50
Total - 130

It still shows the overall total. Same thing happens if I put Mexico and Canada into the Context Filter box and replace the rows with Year or something. It'll show:

Context Filter = Canada, Mexico

Year 2012 - 130
Total - 130

No matter what I try, I cannot get Analysis Studio to count the distinct number of suppliers using a combination of items within a level... it will always show the overall total for the highest level all items belong to.

Any ideas on how to get around this? The same issue is happening when I report using AS or Report Studio, so is this a cube limitation?
 
Thanks for the info... maybe I'll be able to get it working in Report Studio, at least.
 
Hmm... it doesn't seem to be working. The distinctcount function doesn't seem to be supported at all by Cognos. And when I add a dataitem to the query like:

count( distinct [Supplier Name] for [Invoice Year],[Invoice Month])

validation gives me "A syntax error was detected near 'count'".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top