473,408 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Analysing data from multiple row records

H,
I'm hoping some of you can give me ideas on how to deal with our challenge. We are developing a system that will accept excel data files on counseling and health services accessed by users. The users may get the same or different services from multiple agencies in different locations. We want to analyse the combined data to report on the cascade of service accessed and the mobility of users among the locations. This initial phase is meant to show what can be reported from the data and support discussions with the users for the final system design. The final system will most likely be programmed in SQL 2012, but we are using Excel and Access for the initial phase.
The data looks like this, but the real files contain many more services:
ID Age Sex Date Service Cinic
XX123 30 M 10/03/2016 TEST North
XX123 30 M 15/03/2016 ART North
XX123 30 M 25/03/2016 ART South
XX111 21 F 3/03/2016 TEST East
XY222 25 F 5/03/2016 TEST West
XY222 25 F 20/03/2016 TEST Upper
ZZ321 42 M 22/03/2016 TEST Lower
ZZ333 38 F 20/03/2016 ART North
ZZ333 38 F 28/03/2016 ART South

Is there a way of using functions such as COUNTIFS, SUMIFS, etc without having to merge the rows into a single row per ID? Do I need to use pivot tables, macros or move the data into Access? Thanks for any ideas!
Mar 28 '16 #1
4 3704
Rabbit
12,516 Expert Mod 8TB
I don't know what you mean my using count if without merging rows. What would the results be of the sample data above?
Mar 29 '16 #2
Hi Rabbit. Thanks for replying. My initial thought was to combine the rows so there would be one record per person and then proceed with the counts of who accessed what service and where. But, I'm trying to see if there is a way to analyse the data from the multiple rows, as a friend thinks that would be more flexible.
For example, we want to create reports showing the number of people who have accessed a certain mix of services (choices include counselling, condom pickups, medical referrals, tests and treatment) and the number that have moved between the various clinics.
Mar 29 '16 #3
Rabbit
12,516 Expert Mod 8TB
Yes, you can analyze multiple rows. And you should, that's the preferred method. Denormalizing the data and bringing all onto one row is usually a bad idea.

Again, your descriptions are very vaguely defined. All I can say is you can and should analyze it over multiple rows. And you will probably use an aggregate query of some sort. How you go about doing so will depend on your exact requirements which you have not specified.
Mar 29 '16 #4
zmbd
5,501 Expert Mod 4TB
see if this tutorial helps...
MS: COUNTIFS function

If not, then there are other methods such as the DCOUNT()
May 7 '16 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: shank | last post by:
I have a recordset that contains multiple records of product a user is purchasing. For clarity, I converted the recordset fields to variables. I need to take that entire recordset and insert it...
5
by: crispy | last post by:
On this page, you'll see that some PubID's are repeated several times: http://www.ihea.info/pages/website/test1.asp That's because some records have more than one attribute. For example, Title...
5
by: Kaur | last post by:
Hi, I have been successful copying a vba code from one of your posts on how to copy and paste a record by declaring the desired fields that needs to be copied in form's declaration and creating two...
1
by: NumberCruncher | last post by:
Hi All, I am struggling with setting up my first system of tables, forms,and reports, and could use your help! I am setting up a database to keep track of the production of a produced item. The...
7
by: Pim75 | last post by:
Hello, I want to store multiple records at once in a SQL database with a For..Next instruction like the sample code below: For counter = 0 To 100 Dim dbInsert As New SqlCommand( _ "INSERT...
7
by: wozza | last post by:
hi I'm a Dreamweaver user who's created a few simple data entry/ registrations forms in my time, but I'm not really a coder (though I can follow instructions and am not afraid to dabble...) - I...
4
by: phill86 | last post by:
Hi, i have a form that runs a query in a recordset on the after update method if i copy and paste one record at a time the query picks up the records in the underlying table but if i paste...
4
by: harmony123 | last post by:
I would like to display the multiple records in multiple textboxes Following is my tables and data: tblJan with these data: col id 1 2 3 col January 10
27
by: postman | last post by:
I need to combine multiple records into one row with multiple columns for those records. Very similar to a crosstab query, but one that shows all the records, not a summary of them. For...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.