- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I hope you're all doing Good.
I require some assistance from you all on achieving. Any help would be appreciated. Thankyou.
I've 3 tables data which has some count individually. I would like to take all these 3 tables count and put them into a new table. And the values in that new table should like
Without any headers. For an instance. The 1st table has 123 rows so it should be placed in new table like this.
123 - total purchases done.
And the 2nd table has 530 rows so it should be placed in new table like this.
530 - total new products.
And the 3rd table has 90 rows so it should be placed in new table like this.
90 - total old products using barcode.
Finally, the final table should have 3 tables rows count and some comments which I mentioned above seperated with hiphen (-). And the also in final table each value should have atleast 2 rows gap which is like this.
123 - total purchases done
530 - total new products
90 - total old products using barcode.
For your information, those 3 tables rows count will be changed daily wise as they gonna be updated daily and the rows in them aren't permanent they keep on changing on daily run.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Example data should be in the form of data step code.
Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the <> icon or attached as text to show exactly what you have and that we can test code against.
By table do you mean a data set or a report that people read?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
So you basically want to append the observation counts of three datasets with the dataset labels?
The strings that you posted are not valid as dataset names.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
1st dataset obs count - mentioned text
Likewise 2nd and 3rd datasets obs count alongside mentioned text separated with hiphen -
Thankyou.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
How do you relate the texts to dataset names?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
So you want to make a REPORT that has three observations and one variable?
You could use PROC SQL.
Let's assume your three datasets are named A, B and C.
proc sql;
select 1 as order,catx(' - ',count(*),'total purchases done.') as message from A
union
select 2 as order,catx(' - ',count(*),'total new products.') as message from B
union
select 3 as order,catx(' - ',count(*),'total old products using barcode.') as message from C
order by order
;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Stuffing dynamic data into an existing EXCEL file is not really a workable idea.
You could update a data sheet in the EXCEL file and then have the pretty reporting sheet populate the values from that data sheet.
Or produce the full report using your SAS program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content