BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
whyamihere
Calcite | Level 5

I am trying to filter my data set to cluster only records with the cause of death to be cancer or coronary heart disease. I have tried re-wording the filter several times with the exact same results. Any ideas? TIA

 

 

 

 

 

What hints do you have?the filter is appliedthe filter is appliedthe filter is gone when program ranthe filter is gone when program ran

proc stdize data=WORK.PRINCOMP_SCORES_HEART_DEAD out=Work._std_ method=range;
	var Prin1 Prin2 Prin3;
run;

proc fastclus data=Work._std_ maxclusters=2 maxiter=20 drift distance 
		out=work.Fastclus_scores_PCA outstat=work.Fastclus_stats_PCA 
		outseed=work.Fastclus_seeds_PCA;
	where "DeathCause in ('Cancer', 'Coronary Heart Disease')";
	var Prin1 Prin2 Prin3;
run;

proc delete data=Work._std_;
run;

  

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26
where "DeathCause in ('Cancer', 'Coronary Heart Disease')";

 

Do not put double quotes (or single quotes) around the the WHERE condition. This is also probably why the filter doesn't work in your first screen shot.

 

It should be

 

where DeathCause in ('Cancer', 'Coronary Heart Disease');
--
Paige Miller

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26
where "DeathCause in ('Cancer', 'Coronary Heart Disease')";

 

Do not put double quotes (or single quotes) around the the WHERE condition. This is also probably why the filter doesn't work in your first screen shot.

 

It should be

 

where DeathCause in ('Cancer', 'Coronary Heart Disease');
--
Paige Miller

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 930 views
  • 0 likes
  • 2 in conversation