Skip to content
Advertisement

Tag: sas

Use a macro in SAS ‘to_date’ conversion

Being forced to pass my code in explicit pass though, the date conversion no longer works. I would like to use the &aaaa macro in the convert function. My code example : I got an error : “The (full) year must be between -4713 and +9999 and be different from 0”. Does anyone have a solution? Answer Macro variables only

How to obtain summary summation when GROUP BY is not working?

I have data with the columns User_id (char) filename (char) filesize (numeric) Every user_id has more than 5 files to it’s name, of different filesize values. Problem statement: I want to have a summary of this table, with columns, User_id, Filesize, where it shows the total size occupied by each user id. It tried Group By user id, in Proc

concatenating large number of tables in sas

let’s assume i have a large list of tables say : all these tables have the same column names and number of columns, i want to stack all these tables one under the other in one dataset i tried to create a macro to do so (because i have multiple other lists that are larger than this but up until

Group by + sum for different thresholds (preferably in a single query)

Let’s say I have a table with 3 columns: Column A: Client_ID (not unique, can appear in multiple rows) Column B: Price paid for a product Column C: Product (type) I want to get 6 columns: i.e With Client_ID x Product unique I think the first part can be achieved with a simple GROUP BY However, how can I get

Advertisement