According to initial reports, the attack apparently intended to hit crowds gathered to commemorate a political leader from the mainly Shia Hazara minority.
One policeman and six civilians were killed and seven civilians wounded when the bomber was stopped at a security checkpoint, an officials said.
He said the bomber appeared to have intended to attack crowds gathered for the anniversary celebrations of the death of Abdul Ali Mazari, a Hazara political leader killed by the Taliban in 1995.
A string of attacks on Shia mosques and Hazara gatherings has been claimed by an affiliate of Daesh, although many Afghan and Western security officials say they doubt the group works alone.
The attack came less than two weeks after President Ashraf Ghani called on the Taliban to join peace talks to end more than 16 years of the latest phase of the Afghan war.