Hi Guys,
I was just wondering whether I can have dynamic column header for SAS VA report.
For eg:
If I run a report in Jan my report will look like
Actuals | Projected | Projected | Projected | Projected | Projected | Projected | Projected | Projected | Projected | Projected | Projected | ||
Numbers in 000's | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | |
Total Claims | 4000 | - | - | - | - | - | - | - | - | - | - | - | |
# of Accepted | 6790 | 679- | 23 | 90 | 69.0 | 269 | 29.9 | 2 | 27 | 21 | 27 | 20.9 | |
% Accpted | 90.6% | 90.6% | 90.6% | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a |
And if run in Feb then the Feb column header has to change
Actuals | Actual | Projected | Projected | Projected | Projected | Projected | Projected | Projected | Projected | Projected | Projected | ||
Numbers in 00000's | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | |
Total Claims | 3467 | - | - | - | - | - | - | - | - | - | - | - | |
# of Accepted | 356 | 3 | 31 | 26 | 26.0 | 26 | 26.9 | 2.8 | 270.3 | 20.1 | 27 | 279 | |
% Active | 90.6% | 90.6% | 90.6% | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a |
Hi Niz,
To attain the obove requirement, you have to create a calculated Item and them custom category on calculated item.
1. Create a calculated Item:-
IF ( Month(Time) > Month(DatePart(Now())) )
RETURN 1
ELSE 0
where "Time" is the date measure. Let us say the name of this calculated item is "Calculated Item (1)"
2. Create a Custom Category based on the calculated Item that we have created above "Calculated Item (1)", let us name it "Custom Category 1" :-
Create label "Actual" with value of "0.00" and "Projected" with value of "1.00".
Now you can use the created "Custom Category 1" in crosstab as column role to attain the required report.
Hope this helps you.
Regards,
Abhishek
Hi Abhishek,
Thanks for your response.But what I was looking to change the column header label.
I will have measure for each month (12 column for each month) and till current month coulmn I want to have an Actual and for upcoming month measure should have the projected
Tha
Hi Niz,
I think so it is possible to attain the above requirement once you make all these 12 measures(months) into one category may be named as "Months" which can be achived at the stage of data preparation.
Thanks
Abhishek
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.