The man, described as being in his late 30s, tried his luck at a Co-op store in Follyborn Place, Livingston at around 8.20pm on Friday.
But he failed to make off with any loot after members of staff refused to hand over any money or goods.
Around half-an-hour later the man entered the Spar shop in the Crofthead Centre in Edinburgh and brandished a knife at a female member of staff.
He made off with a four-figure sum of cash in a black sports holdall before running away.
The suspect is described as white, around 6ft 3ins or 6ft 4ins tall and of slim build.
He was wearing a yellow high-visibility jacket, dark trousers, boots, a black hat with earflaps and the front panel folded up and canvas gloves with orange finger grips.
Detectives are linking both incidents and urge anyone with information that can assist with their enquiries to come forward.
A police spokesman said: “After failing in his first attempt, the male has then opted to threaten staff at the Spar store before making off with a sum of cash.
“Anyone who recognises this male’s description or has information that can help identify him is asked to contact police immediately.”
Anyone with any information should contact Lothian and Borders Police on 0131 311 3131, or the charity Crimestoppers, in confidence and complete anonymity, on 0800 555 111.