If the dashboard is part of your mendix application, you can use the data from your domain model. There is no need to access the database in any other way.
Or is your dashboard part of another mendix app? If so, you will need to create some API (REST for example) that can be consumed by your dashboard app.