BookmarkSubscribeRSS Feed
kuppusamy
Fluorite | Level 6

In report col lead generated instead of  "Total OCC A&C" , I want "Total Digital" But In a program how to edit the macro variables to get "Total Digital".

3 REPLIES 3
Vish33
Lapis Lazuli | Level 10

Hello,

 

as in the attached document , it is the value of column "how" which is adding after each category .

 

Its like  Total &category. , if the category value equals "Digital" then dynamically it will allocate the value as "Total Digital" otherwise  you may need to hard code the value which will appear  after all categories.

 

 

Thanks

Vish

Cynthia_sas
SAS Super FREQ

Hi:

  I don't see any macro variables in your code, although your screen shot was VERY hard to read. To get Total Digital, at the summary line, you'd have to change your program logic. Right now, you're using PRETEXT as a style override, which is putting the string 'Total' in front of the group value. But if you want it to be some OTHER string, then you need to use a different technique, something like this:

break_report_diff.png

 

Hope this helps,

Cynthia

ballardw
Super User

@kuppusamy wrote:

In report col lead generated instead of  "Total OCC A&C" , I want "Total Digital" But In a program how to edit the macro variables to get "Total Digital".


Please do not post pictures of CODE or Log results. Copy from the text from the editor or Log and paste into a code box opened on the forum using the {I} or "running man" icons. One issue with your specific image is that you have code that runs past the margins of the image. So we don't even have the complete code that you attempted to show.

 

If you are using macro variables, ensure to include the place that you set the variables as well as how you are attempting to use them.

 

Also post complete procedure code not just snippets from the middle of a procedure. From the partial code you show we cannot tell:

1) which variable or column you are referencing

2) what the current label might be for the variable (likely default value in a column heading)

3) why you think you need any macro variable to set a heading: the define statement will do that without any macro code needed

4) what you may have attempted that would have changed the displayed heading

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 619 views
  • 0 likes
  • 4 in conversation