When I put a total beneath a column for which the "Hide Duplicates"
checkbox is checked, the hidden values are still counted in the total.
I don't want the hidden values to be counted in the total. Can someone
tell me if this is how Hide Duplicates is supposed to work and/or
suggest a possible workaround?I am wondering why no one has answered this question as I too am
interested in an explanation of this behavior.
I was under the impression that Microsoft moderated this newsgroup and
made some sort of promise to respond to these kinds of questions.
Please help!|||Hi, Lee.
The way hide duplicates works is that it doesn't show a duplicate value in
the table, but this value is still part of the dataset. So when you do the
total of the field, it doesn't look at the table it just looks at the dataset
and sums the data. Therefore it counts all the data.
A possible workaround is, if all of the values are the same, then take the
first one.
If not, it is a lot more difficult. First try to change your dataset to
retrieve only unique values, if possible. Otherwise, custom code will
probably be needed. Probably build an array of unique values. The last
solution I have not tested and I'm not sure how it would actually work.
I hope this helps.
"Lee" wrote:
> When I put a total beneath a column for which the "Hide Duplicates"
> checkbox is checked, the hidden values are still counted in the total.
> I don't want the hidden values to be counted in the total. Can someone
> tell me if this is how Hide Duplicates is supposed to work and/or
> suggest a possible workaround?
>|||Replace Count(...) with CountDistinct(...)
GeoSynch
"Anton" <Anton@.discussions.microsoft.com> wrote in message
news:A95DC535-C2D4-4FF1-AC59-C7A75DA6834A@.microsoft.com...
> Hi, Lee.
> The way hide duplicates works is that it doesn't show a duplicate value in
> the table, but this value is still part of the dataset. So when you do the
> total of the field, it doesn't look at the table it just looks at the dataset
> and sums the data. Therefore it counts all the data.
> A possible workaround is, if all of the values are the same, then take the
> first one.
> If not, it is a lot more difficult. First try to change your dataset to
> retrieve only unique values, if possible. Otherwise, custom code will
> probably be needed. Probably build an array of unique values. The last
> solution I have not tested and I'm not sure how it would actually work.
> I hope this helps.
> "Lee" wrote:
>> When I put a total beneath a column for which the "Hide Duplicates"
>> checkbox is checked, the hidden values are still counted in the total.
>> I don't want the hidden values to be counted in the total. Can someone
>> tell me if this is how Hide Duplicates is supposed to work and/or
>> suggest a possible workaround?
>>
No comments:
Post a Comment