In this article, we review the recent progress in our understanding of electronic states in SmS, Yb-based quasicrystals and approximants, which exhibit valence-fluctuations. Results of partial-fluorescence-yield X-ray absorption spectroscopy experiments are presented. We also present the intriguing relationship between the rare-earth meanvalence and the thermodynamic properties, with an emphasis on the discussion of the possible origin of the unconventional quantum critical behavior in the Yb-based quasicrystals.