How to write “function” or “if” with day, If my data does not exist every day. Shiny dashboard

Hi,

I'm not really sure what you want to do here...
It seems logical to me that if you click the bar and there is no sale for a particular day that the table is empty right? What would you like to happen or not happen in case there is no sale?

Also, providing your whole whole app is not the best way to convince folk to attack your issue, because it's very hard to read another person's code, especially since likely 99% is not part of the issue. Try and isolate the issue and recreate it in a small reprex, and you might have more chance that folk can quickly help you out. A reprex consists of minimal code and data needed to recreate the issue, omitting any other code. Shiny debugging and reprex guide

PJ