At the end of this week's parsha, Moshe is told to go to the mountain where he is to pass away. The pasuk states the reason(s) why he is dying here (32:51): "Al asher me`altem bi... al asher lo kidashtem osi," (Concerning the rock-hitting incident) because of that which you trespassed against me... that which you did not sanctify me. Why is it that two reasons are given? The GR"A on Pirkei Avos 3:1, "lifnei mi ata atid litein din vecheshbon" writes that din, judgement, refers to the direct judgement of a person's deeds. Cheshbon, calculation, refers to what that person could have been doing at that time. So, one is judged not only for their bad deeds, but for the good deeds they could have been doing at that time. This, suggests Meshech Chachma, is the meaning of this pasuk. "Al asher me`altem bi" refers to the din, that which they did. "Al asher lo kidashtem osi" refers to the cheshbon, the judgement on what they could have done at that time. Had Moshe not hit the rock, there would have been a kiddush HaShem.
Meshech Chachma explains at the end of parshas Nitzavim that this concept is a very important one to keep in mind on Yom Kippur. The gemara (Yoma 20a) says that the gematria of haSatan is 364, to hint that every day of the year the satan is allowed to do his "work." But on one day of the year, Yom Kippur, he is not. This day is set aside to allow us to do a full teshuvah without having to battle the satan. When we say the berachah of shehecheyanu at the beginning of Yom Kippur, we must say it with total and utter happiness, in appreciation of this opportunity that HaShem has given us. But if we don't use this time to do teshuvah, the time that HaShem has specifically set aside for teshuvah, how much greater of a transgression it is, that we have actively rejected this opportunity.
Have a good Shabbos and a gemar chasimah tov(ah).