BookmarkSubscribeRSS Feed
JenHarper
Calcite | Level 5
Hi all, Two questions:

#1 - autosort with decimals and/or percent signs
I was just wondering if anyone had any thoughts on sorting numbers with decimals. I actually have numbers I format as percent8.2 and output with proc report (column is set for display). The sort='yes' function of the tagset works, but it sorts it as text. I thought perhaps it was because of the percent sign so I tried just outputting the number*100 to avoid the percent sign but it still sorts like text. Perhaps it is the decimal? Unfortunately I need to present whole numbers to two decimal points, but I could live without percent signs. Anyone have any clever workaround ieas? Example of how my data is sorting (descening obviously):
[pre] 25.72
3.13
30.00
4.17
4.35[/pre]
#2 autofilter columns - limiting to just 3 columns
Same table as above (proc report in ods tagsets.tableeditor). If I use just sort='yes' then sort works. If I use sort='yes and auto_filter='yes' then I can sort and all columns have (populated) filter boxes. What I really want is filter boxes on just 3 columns. Below is the code I use, but when I add filter_cols='1,2,3' sort doesn't work and no filter boxes show up. Saw this in both IE7 and IE8.
[pre]
ods tagsets.tableeditor style=analysis
path="c:\temp\" body="test.htm"(title="test level")
options(highlight_color='#fff8cd' sort='yes' autofilter='yes' filter_cols='1,2,3');
[/pre]
One more strange twist is that if I say filter_cols='2,3' then all the columns have filter boxes, but only col2 and col3 have values in them.
3 REPLIES 3
JenHarper
Calcite | Level 5
Re #2
I just tried the autofilter_endcol option and that seemed to work since what I am trying to do is just the first 2 or 3 columns...
[pre]
ods tagsets.tableeditor style=analysis
path="c:\temp\" body="test.htm"(title="test level")
options(highlight_color='#fff8cd' sort='yes' autofilter='yes' autofilter_endcol='2');
[/pre]
Still looking for help on #1.
Cynthia_sas
SAS Super FREQ
Hi:
I'm not that familiar with tagsets.tableeditor and how it works. You might look to Tech Support for help with #1. If they don't know the answer, they can find the person who wrote the tagset and ask for help.

cynthia
KVoss
Calcite | Level 5
I believe I ran into this problem previously and used the following tableeditor tagset option to force the proper data type.
data_type="String,Numberx,Numberx,Numberx,Numberx,Numberx,Numberx,Numberx"

I don't have time to test but as I recall, this solved a similar problem that I had.

Keith

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 1302 views
  • 0 likes
  • 3 in conversation