Non empty doesn't filter out calculated measures. Because your measures are defined in the query they're never filtered by the Non empty clause. Try a Filter function instead.