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.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

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