Joanie Lyman was Josh Lyman's older sister, who passed away when Josh was a kid.
In the first season's fifth episode Josh has an appointment with a psychiatrist or psychologist, to whom he explains the following: His older sister Joanie was babysitting him when a popcornmaker caused a fire. Frightened, Josh ran out of the house. The fire then killed his sister. Josh expresses feelings of guilt and is comforted by the shrink. Josh notes that Joanie loved music and wanted to be an orchestra conductor.
It might well be argued that his relationship with C.J. Cregg mirrors this kind of sibling interaction.