Q: How Do I Know Whether My Nonfiction Ebook/ Novel Will Sell?
Test the market. Write something short, and see what response you get.
If you want to write a nonfiction ebook about behavioral problems in dogs for example, create a short ebook of 20 pages (5000 words) about fixing barking problems. If you get sales, write the full ebook. No sales? There can be a number of reasons for this. However, you might want to rethink your topic.