01-31-2019
BarneyC77
Calcite | Level 5
Member since
01-06-2019
- 13 Posts
- 0 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by BarneyC77
Subject Views Posted 805 01-08-2019 03:37 AM 822 01-07-2019 02:24 PM 3271 01-07-2019 02:23 PM 3276 01-07-2019 02:14 PM 3281 01-07-2019 01:47 PM 3294 01-07-2019 12:49 PM 3319 01-07-2019 12:07 PM 3327 01-07-2019 11:52 AM 3328 01-07-2019 11:50 AM 3343 01-07-2019 11:10 AM -
Activity Feed for BarneyC77
- Posted Re: Summing values in a column dependent on dates and conditions in other columns on SAS Enterprise Guide. 01-08-2019 03:37 AM
- Posted Re: Summing values in a column dependent on dates and conditions in other columns on SAS Enterprise Guide. 01-07-2019 02:24 PM
- Posted Re: Summing values in a column dependent on dates and conditions in other columns on SAS Enterprise Guide. 01-07-2019 02:23 PM
- Posted Re: Summing values in a column dependent on dates and conditions in other columns on SAS Enterprise Guide. 01-07-2019 02:14 PM
- Posted Re: Summing values in a column dependent on dates and conditions in other columns on SAS Enterprise Guide. 01-07-2019 01:47 PM
- Posted Re: Summing values in a column dependent on dates and conditions in other columns on SAS Enterprise Guide. 01-07-2019 12:49 PM
- Posted Re: Summing values in a column dependent on dates and conditions in other columns on SAS Enterprise Guide. 01-07-2019 12:07 PM
- Posted Re: Summing values in a column dependent on dates and conditions in other columns on SAS Enterprise Guide. 01-07-2019 11:52 AM
- Posted Re: Summing values in a column dependent on dates and conditions in other columns on SAS Enterprise Guide. 01-07-2019 11:50 AM
- Posted Summing values in a column dependent on dates and conditions in other columns on SAS Enterprise Guide. 01-07-2019 11:10 AM
- Posted Re: Summing values in a column dependent on dates and conditions in other columns on SAS Programming. 01-07-2019 11:07 AM
- Posted Re: Summing values in a column dependent on dates and conditions in other columns on SAS Programming. 01-07-2019 05:25 AM
- Posted Summing values in a column dependent on dates and conditions in other columns on SAS Programming. 01-06-2019 07:09 PM
01-08-2019
03:37 AM
Hi Reeza, You're probably right, I'm obviously doing something wrong. I am very new to this. I'm gutted as it's nearly there, but not quite, so my incompetence is clearly causing problems, even given your patience. The entirety of the code I'm using is below and it's generating the attached pdf without any errors, but the months are still appearing as row headers and not column headers, and I'm not sure where/how to insert the noprint to remove the extraneous columns. I've only amended the 'Have' reference to refer to the data source 'WORK.SASExample'. proc means data= WORK.SASExample nway; class reference date; format date monyy7.; var lifetimecostScore; output out = totals sum=MonthlyScore; run; proc transpose data=totals out=want prefix=Date_; by reference; id date; idlabel date; var MonthlyScore; run; I'm posting again the probably vain hope that you haven't totally lost patience with my incompetence and might still be willing to help, as I'm doing some analysis for work. Thanks, Barney
... View more
01-07-2019
02:24 PM
I wanted it to refer to the data that I've extracted as the source data may well change, and I would like the programme to run over the dynamic data
... View more
01-07-2019
02:23 PM
I've just been replacing want with the data reference. The full code I've been using is below. proc means data=WORK.SASExample nway; class reference date; format date monyy7.; var lifetimecostScore; output out = totals sum=MonthlyScore; run; proc transpose data=totals out=want prefix=Date_; by reference; id date; idlabel date; var MonthlyScore; run;
... View more
01-07-2019
02:14 PM
Thanks so much for your help, I really appreciate it. There are no more errors and it runs. However the output hasn;t transposed correctly - ie the Dates are still coming p as row labels rather than column headers. Also, I only need the one result (ie not N Obs, N, Std Dev, Minimum, Maximum). See attached pdf for output
... View more
01-07-2019
01:47 PM
Thanks - nearly there I think - there's another error message copied below. Do I need to sort it between steps? ERROR: Data set WORK.TOTALS is not sorted in ascending sequence. The current BY group has Reference = CS-YES-ECO215-SWP and the next BY group has Reference= CS-ACWhyte-ECO210-SWP.
... View more
01-07-2019
12:49 PM
Thanks Reeza. I'm getting a syntax error after the transpose step proc transpose Completion_Date=totals out=want prefix=Date_; _______________ 22 76 ERROR 22-322: Syntax error, expecting one of the following: ;, DATA, DELIM, DELIMITER, LABEL, LET, NAME, OUT, PREFIX, SUFFIX. ERROR 76-322: Syntax error, statement will be ignored.
... View more
01-07-2019
12:07 PM
I'm summing the data as well - there are more than one instances of scores for each reference. It's not just s straight transpose
... View more
01-07-2019
11:52 AM
Hi, See attached. I've included an 'as is' and a 'to be' in separate tabs Thanks, Barney
... View more
01-07-2019
11:10 AM
Hi, I am new to SAS EG, and think in Excel terms. I have three columns: (1) a reference; (2) a score; and (3) a date. The task I am trying to perform is equivalent to a sumifs function in excel. I want to sum the total score of all entries in the score column for each reference, whose dates fall within defined ranges. I intend to create columns for each month so that I know what the total scores are for each reference for each month. Can I build a query and assign conditional variables, including specifying date periods? Ie I have list of thousands of scores with a reference and a date, and I want to know the total score of all entries for each reference that falls within each particular month. Help needed! Thanks in advance all. Best, Barney
... View more
01-07-2019
11:07 AM
Hi, Thanks for your help with my SAS query. I'm happy with using either point and click or programming, whatever works. Are you able to help with some code? Thanks, Barney
... View more
01-07-2019
05:25 AM
Great - thank you. Is this through SAS Enterprise Guide? I am very new to SAS EG and even the tutorial seems to assume knowledge/experience I don't have. Sorry
... View more
01-06-2019
07:09 PM
Hi, I am new to SAS, and think in Excel terms. I have three columns: (1) a reference; (2) a score; and (3) a date. The task I am trying to perform is equivalent to a sumifs function in excel. I want to sum the total score of all entries in the score column for each reference, whose dates fall within defined ranges. I intend to create columns for each month so that I know what the total scores are for each reference for each month. Ie I have list of thousands of scores with a reference and a date, and I want to know the total score of all entries for each reference that falls within each particular month. Help needed! Thanks in advance all. Best, Barney
... View more