BookmarkSubscribeRSS Feed
Caleb2
SAS Employee

I created a report using data from January and I have similar datasets (all of the same column headers) for every other month. Is it possible to duplicate all efforts from the January report / dataset to create similar reports for every other month without manually doing the same work for each month?

6 REPLIES 6
Reeza
Super User

Yes, but you probably need to provide more info on what you're doing for specific assistance. Sometimes this is done via macros (see links below) or via BY group processing depending on the code.

 

 

UCLA introductory tutorial on macro variables and macros

https://stats.idre.ucla.edu/sas/seminars/sas-macros-introduction/

Tutorial on converting a working program to a macro

This method is pretty robust and helps prevent errors and makes it much easier to debug your code. Obviously biased, because I wrote it 🙂 https://github.com/statgeek/SAS-Tutorials/blob/master/Turning%20a%20program%20into%20a%20macro.md

Examples of common macro usage

https://communities.sas.com/t5/SAS-Communities-Library/SAS-9-4-Macro-Language-Reference-Has-a-New-Ap...

 


@Caleb2 wrote:

I created a report using data from January and I have similar datasets (all of the same column headers) for every other month. Is it possible to duplicate all efforts from the January report / dataset to create similar reports for every other month without manually doing the same work for each month?


My mistake, missed that this was in SAS VA.

MarkusWeick
Barite | Level 11

Hi @Caleb2,

 

if you use the "change data source" option you can load the table for the new month.

As my SAS server is down, I insert an image from the web, where another option is marked. But you have to use the "change data source" option:

 

01_SaveDataView.png

(Image taken from: @TeriPatsilaras :  Using Data Views in SAS Visual Analytics, Using Data Views in SAS Visual Analytics - SAS Users)

 

Best

Markus

Please keep the community friendly.
Like posts you agree with or like. Mark helpful answers as “accepted solutions”. Generally have a look at https://communities.sas.com/t5/Getting-Started/tkb-p/community_articles
Caleb2
SAS Employee

Hi @MarkusWeick,

 

I don't seem to have that option available: 

Caleb2_0-1687287922031.png

 

I already imported the file for February:

Caleb2_1-1687287973911.png

 

I created a handful of calculated items from the raw data in 'JAN PROJECT COUNT' and want to duplicate these items using the raw data from 'FEB PROJECT COUNT"

 

Is this possible?

 

Thanks,

Caleb

 

Madelyn_SAS
SAS Super FREQ

Are these tables exactly the same except for the actual values? So, the column names, data types, everything? If so, you should be able to Replace JAN PROJECT COUNT with the Feb table. 

 

You should first remove the Feb table from the report.

MarkusWeick
Barite | Level 11

As Madelyn wrote:

 

MarkusWeick_0-1687289632786.png

 

Please keep the community friendly.
Like posts you agree with or like. Mark helpful answers as “accepted solutions”. Generally have a look at https://communities.sas.com/t5/Getting-Started/tkb-p/community_articles

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 988 views
  • 4 likes
  • 4 in conversation