BookmarkSubscribeRSS Feed
Anita_n
Pyrite | Level 9

Dear all,

I wish to display this information in a bar chart but am not sure of how to do this properly. I have a tumor type A with different diagnosis dates, sex and the date when this patients were enrolled in a research. 

A set of patients were enrolled in a research program (enrollment_date), it was detected later that these patients had developed cancer (diagnosis date) I want to display these two dates in a bar chart with the corresponding number of cases and sex. 

Any idea how I can correctly do that?

 

Tumor_type Date of Diagnosis sex Enrollment_Date Number_of_cases
TumorA 2010 M 2009 4
TumorA 2012 M 2009 3
TumorA 2012 M 2011 1
TumorA 2012 F 2011 5
TumorA 2017 M 2010 2
TumorA 2017 M 2014 5
TumorA 2017 F 2009 1
TumorA 2018 M 2010 7
TumorA 2018 M 2012 1
TumorA 2019 M 2000 2
TumorA 2017 M 2007 2
TumorA 2017 M 2010 1
TumorA 2018 M 2008 3
TumorA 2018 M 2012 1
TumorA 2020 M 2007 9
TumorA 2020 M 2013 2
1 REPLY 1
ChrisNZ
Tourmaline | Level 20

I'm unsure a bar chart is the best tool for this data. Draw you graph on paper until you're happy with the meaning conveyed by the graph, and then program it.

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

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 601 views
  • 0 likes
  • 2 in conversation