Hi @robinbeuk88 ，
The connection mode you are using is DirectQuery, in which case the visual needs to connect to the data source from the gateway in order to load the data if the data source is local.
Please install the on-premises data gateway and configure the gateway for the dataset.
Install an on-premises data gateway
Setting up Power BI Data Gateway
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data