Solved

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

Posted on 2016-10-25
1
86 Views
Last Modified: 2016-10-25
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
0
Comment
Question by:Lisa Randle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
Lisa Randle earned 0 total points
ID: 41859416
Nevermind!!!  I found out its considered a Complex Expression.  
I used:  Total Visits: =CountDistinct(Fields!Name.Value & "-" & Fields!Date.Value)
Complex Expressions:  https://msdn.microsoft.com/en-us/library/dd220516.aspx#Anchor_2
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SSRS Parameters 10 46
Executing multiple ssrs reports from ssis package 20 76
Report Builder 3.0 3 58
SQL Server query - can a #temp table be improved with indexing? 6 78
Hi All, I am here to write a simple article to move SSRS (SQL Server Reporting Services) reports from one server to another. When I have faced the same issue to move reports those were developed by developer on development server and now need to …
A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question