In the $$ViewTemplate, count the elements in the view using @Elements(@DbColumn). This will get the number of documents in the view. You can then use this in the paragraph hide-when for the embedded view to hide it. In another paragraph, you can use the opposite of this formula to unhide a custom message or passthrough HTML.