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

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


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
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

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
------------------------------------------------------------------------------------------------------------------------------------------- - OLAP solution for Delphi, C++ Builder and ActiveX environment
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 1 guest