Did you just have to die in a fight? Did you have to have a weapon in hand the moment you died? Did you have to kill a certain amount of people in order to qualify for entry to Valhalla?
Put it simply, we don't know for sure at least based on the extant primary sources, and it had probably never been any single, established rule across Scandinavia.
As /u/bloodswan and /u/Platypuskeeper argue in If a viking was wounded in battle but then died after it from infection or similar, did they believe that they would still go to valhalla? and in How much do we actually know about the ancient religious traditions, deities and narratives of the Norse? respectively, different beliefs on afterlife seemed to co-exist in Viking Age Scandinavia. Furthermore, the most famous extant primary texts, Poetic Edda in Old Norse-Icelandic, recorded by the 13th century Icelanders, more than about 2 centuries after their 'official' conversion to Christianity (at least according to their official historical writing, the Book of the Icelanders), does not necessarily represent either the accurate or the orthodox understandings of the beliefs in the past.
/u/sagathain also points out the possibility in Why is ancient Viking beliefs, regarded as 'Mythology' and not as a Religion?, well-known afterlife traditions narrated in Old Norse 'mythological texts' probably did not corresponds with the actual beliefs in Viking Age Scandinavia.
I also once posted an answer to the similar question to OP in Getting into Valhalla- representations of Dane religion in the show “The Last Kingdom”, illustrating the plurarity of different (indeed conflicting) pre-Christian beliefs on the afterlife in the understanding of the 13th century Icelanders, possibly even in that of the single, famous Icelandic author, Snorri Sturluson (d. 1241).
Any Norse religion question is difficult to answer for a reason you'll see. More can always be said on the matter of Norse religion, but the real problem, as explained by u/Steelcan909, is just plain that we don't know.