This project has moved. For the latest updates, please go here.

Update estimated count

Oct 24, 2008 at 10:04 AM
I downloaded and installed bidshelper and I appreciated a lot some features, but I've just a question about 'Update Estimated Count'. Launching this procedure I expect to see all the attributes set with the exact counts within the partition; so, let suppose to have a yearly partition, in the time dimension I will expect this :
Date <= 365
Month <= 12
Year = 1
In the end of the procedure I see the key attribute ('Date' for that dimension) with the correct count, but the other attributes with an higher count:
Date = 278
Month = 64 (the time dimension has 66 months)
Year = 6 (the time dimension has 6 years)
For the dimension key attribute ('Date') the count is correct, but the 'Month' and 'Year' counts seem to be calculated as the partition contains all the fact data. And for all the other dimensions I have the same problem: the counts are correct for the dimension key attribute only.
I tried also to create a  very simple cube with one dimension and a fact table with 14 rows, but I got the same result.
Where am I wrong?
Many thanks for your time.
Oct 27, 2008 at 9:05 PM
Hi Paolo,

We will have a look into this and see what is going on.

Oct 29, 2008 at 1:11 AM
Hi Paolo,

I just double checked this. All we are doing in BIDS Helper is zeroing out the existing counts and calling the function in BIDS itself to update the estimated counts (the same as when you click update counts in the UI when you design aggregations for the first time ). If this is a bug it would be a bug in BIDS itself and you could log it at if it is not urgent - otherwise you could try ringing Microsoft product support.

This could also be an issue with your attribute relationships. Do you have relationships defined to say that Date has a relationship to Month and Month has a relationship to Year?

Oct 29, 2008 at 10:36 AM
Edited Oct 29, 2008 at 10:54 AM
Hi Darren,
I tought too that the attribute relationships could be wrong, but a relationship exists between Date and Month, and between Month and Year; and then this problem affects all the dimensions.
Debugging the code I've seen that the statement that updates the attriubutes counts (within the partition) is this:


PartitionUtilities.SetEstimatedCountInAttributes(info.aggDesign, info.measureGroupDimension, new Partition[] { info.partition }, null).

It runs a distinct count query against the database, but for the dimension key attribute only (the only one that is directly related to the fact table);and so I don't understand how the other dimension attributes counts are estimated.

Thank you for the assist.


Oct 31, 2008 at 8:53 AM
I've logged the problem at
Could you let me know if you have some ideas? :-)

Many thanks.