count unique values

Discussion forum for PivotCubeX component. Common usage questions. Bug and problem reports

Moderator: Alex Zencovich

count unique values

Postby aragorn0d » Tue Dec 12, 2006 9:38 am

Hi!
Forgive me for my bad English
One of these days has downloaded Demo PivotCube and at once the question was drew

As in PivotCubeХ to count unique values

Example

The client 1 goods 1
The client 1 goods 1
The client 1 goods 2
The client 2 goods 2
The client 2 goods 2

How to consider how many the different goods it is sold
The client 1 - 2
The client 2 - 1
Usual count at me shows
The client 1 - 3
The client 2 - 2

Beforehand thank
aragorn0d
Guest
 
Posts: 1
Joined: Fri Dec 08, 2006 2:46 pm

Postby AlexZencovich » Tue Dec 12, 2006 10:53 am

1 Hmm, how anybody (including PivotCube) can know (when you place Client on rows) you would like unique Goods (not Years, Cities etc)?
You should place Goods as second dimension under Clients and you will able to see which goods were sold for each client
Like

Client1 3
Goods1 2
Goods2 1
Client 2 2
Goods2 2

where 2,1,2 is actual number of sales of each goods to each client.

2 There possible to get number of embedded cells for each cell over rows or columns (2 or 1 in example above) with call to PivotCubeX.MapGetRowCellInfo (MapGetColumnCellInfo) but PivotCube has no place to display this information(any suggestions would be appreciated).

3 You may try do next trick - assign unique integer ID for each goods, create measure like goods" (ctCOunt) with that unique ID as value in facttable. After that, if you will set DISTINCT mark in goods" measure you will see only counts of unique goods regardless of clients or other dimensions (unique goods over city, year etc etc)
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am


Return to PivotCube ActiveX

Who is online

Users browsing this forum: No registered users and 0 guests

cron