Problem: I have our CRM connected to PowerBI through Common Data service (CDS) but I am not able to pull the views (system or personal) from Dynamics into PowerBI.
Tried: Of course, I can just get whole Dynamics Entities through the CDS connector in PowerBI but I cannot select the views I have prepared.
Situation: At the moment we use a mirror image of our Dynamics Database in SQL to run data queries of for PowerBI (as to not affect the performance of the Dynamics server when someone pulls millions of rows of data to refresh their BI reports.) We create the copy of our Dynamics Data Base using the Data Integration Tool for Dynamics CRM. The Views (& Stored Procedures) we have set up in our SQL Data Base ("....database.windows.net" image below) are what we give users access to to run their reports from. (I did not expands the views/store procedures but their are there)
Solution: Image of SQL code & errors
It would be much more efficient to not have to use the Data Integration Tool to pass our Dynamics Data Base to our SQL Data Base and instead use Common Data Service, however, in CDS I do not seem to be able to create either:
Views
Stored Procedures
I understand that CDS is more a way to access data than a data base but we want more control over which data users can access. That is, we want to only show them what we choose to, which is a sub set of what they would be able to see using roles and privileges in Dynamics.
Here an article on how we have set up the Dynamics - CDS integration: https://www.powerobjects.com/blog/2020/05/20/use-sql-to-query-data-from-cds-and-dynamics-365-ce/