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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count in Master Detail

Status
Not open for further replies.

basingstokett

Technical User
Oct 3, 2006
10
GB
I need some help getting the correct formula context in a Master Detail heading.
To demonstrate, if you first create a simple report using Island Resorts to show Country, Resort and Service Line from the Resort Class. When the report has run create a Master Detail based on Country and add a CountAll to the Resort column, ie the total for US should be 9. Drag out the total (9) into the Master Detail Heading and it shows 1. I've tried lots of combinations in the formula of 'In', 'ForEach', etc, but just can't seem to get the correct total (9) to display.

Help please!
 
CountAll often seems to have a life of it's own.
I usually create a compound variable that is unique and then perform the Count() function on it.
This works much easier.

So, in your case:

Code:
=Count(<New Variable>) In (<Country>)

where the new variable is the concatenation of Resort & Service Line


Ties Blom

 
Thanks and yes, I can see the logic here and hear what you are saying about CountAll. What I really want to do though is to have a count of rows (hence the CountAll) in a Master Detail Section, but unless I am missing something obvious, seems rather complicated. I'd appreciate any further thoughts.

Thanks
 
Well, I just gave you a solution that is guaranteed to work.

The number of rows displayed in a table is effectively rolled up to the set of dimensions/details

The number of unique combinations of Resort/Service Line IS the number of rows displayed.

Hence the count over the composite variable as suggested earlier. Try it, it works!!

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top