Link to home
Start Free TrialLog in
Avatar of Lisa Randle
Lisa RandleFlag for United States of America

asked on

Visual Studio 2008 - name with more than one visit. I need an expression to count a distinct name ID on a date

I have a Visual Studio 2008 report with name, nameID (hidden), date of service, DOB and several other columns. I need to count the distinct name visits (using the name ID and date of service). Some names have more than one date of service with more than 1 transaction (names=30, datesvc=36, transactions=80).
 They are grouped by Name, NameID (hidden), DateSvc, Transaction. I thought Count(DateSvc) would work but it gives me the same amount of transactions, not visits. Any help is appreciated.

I can't put a sample of the data due to confidentiality. But here's a typed sample of it:
 Name......DateSvc......DOB......Trans......More columns
 DOB to the right can be several rows depending on the transaction
 Service Date can span one or several rows depending on the date of the transaction
 The name spans all rows for that persons transactions on the specific service date
 Name1.....1/1/16.....9/5/2008.....trans 1 for that day
 ...............1/4/16.....9/5/2008.....trans 1 for that day (same person)
 ...............1/4/16.....9/5/2008.....trans 2 for that day (same person)
 Name2.....6/9/16.....3/7/2002.....trans 1 for that day
 Name3.....6/9/16.....5/1/2000.....trans 1 for that day

 This should show 3 names, 4 visits and 5 transactions
 The 4 visits is where I'm having the problem.

When I try   =CountDistinct(Fields!DatesSvc.Value,"NameID")
I get:  The Value expression for the text box 'TextBox256' has a scope parameter that is not valid for an aggregate function. The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region or the name of a dataset.
I'm placing the expression in a separate tablix above the table. I want that information (totals) separate and if the user wants to see the details, they can click to toggle and see the info below
ASKER CERTIFIED SOLUTION
Avatar of Lisa Randle
Lisa Randle
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial