Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
fuglphoenix
Frequent Visitor

problems with directquery to dynamics cds

i've been experimenting with the CDS and direct query, using this guide https://crmchartguy.com/2020/05/29/directquery-cds-from-power-bi/ and it has been working great for a few weeks/months.

but suddenly it doesn't work anymore, i haven't touched my setup and it started to give me an error in the pbi visuals:

 

Index was outside the bounds of the array.. The exception was raised by the IDataReader interface

 

i'm not manipulating my data at all, so why i get an index out-of-bounds i can't figure out.

 

it works just fine when i view the data in the "Transform data" window. it is only in the report pages the error appears.

my powerquery:

 

let
    Source = Sql.Databases("mycompany.crm4.dynamics.com,5558"),
    orgXXXX= Source{[Name="orgXXXX"]}[Data],
    dbo_systemuser = orgXXXX{[Schema="dbo",Item="systemuser"]}[Data]
in
    dbo_systemuser

 

 

I know that the functing is experimental, and thus it might be unstable sometimes. but is there something I can do to make it work, or should i just wait...

 

edit:

i tried to change to "import"-mode instead of directquery. and i works just fine 🤔

1 ACCEPTED SOLUTION

@lbendlin, i'm not sure I understand what you mean.

because it does load the data from  db tabel systemuser into dbo_systemuser, which i load directly into the pbi datamodel.

it looks fine in the powerquery window (ie. i see the data), but as soon as I apply and load it into pbi it breaks.

unless I switch from directquery to import. that will fix the issue...

 

okay. this i strange. I was about to get some screenshots of the issue. 

and despite being broken for a few weeks, and i haven't change anything. it suddendly works...

i guess that i might have been a problem with cds endpoint

View solution in original post

4 REPLIES 4
v-xuding-msft
Community Support
Community Support

Hi @fuglphoenix ,

 

I found a video that use the Power Apps visual in Power BI to add/update data in CDS using Direct Query Mode.  You could have a try.

https://community.powerbi.com/t5/Power-Platform-Integrations/Power-Apps-Visual-for-Power-BI-CDS-Dire...

 

 

And I see the comment from https://crmchartguy.com/2020/05/29/directquery-cds-from-power-bi/. There is other user that encounters this issue and he/she changes to import mode as well. Then the report works fine. Maybe it happens because it is preview?  I haven't tried it. If you need to use this way to do. You could create a support ticket to get the dedicated support.

How to create a support ticket in Power BI  

 

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lbendlin
Super User
Super User

your Power query is incomplete. It just connects to the table "systemuser"  (in a roundabout way).  What happens next?

@lbendlin, i'm not sure I understand what you mean.

because it does load the data from  db tabel systemuser into dbo_systemuser, which i load directly into the pbi datamodel.

it looks fine in the powerquery window (ie. i see the data), but as soon as I apply and load it into pbi it breaks.

unless I switch from directquery to import. that will fix the issue...

 

okay. this i strange. I was about to get some screenshots of the issue. 

and despite being broken for a few weeks, and i haven't change anything. it suddendly works...

i guess that i might have been a problem with cds endpoint

Hi @fuglphoenix ,

 

Today, I find that this is listed as a known issue internally.

 

There are two scenario about it. One is with SSO enabled.  This is still fixing.

v-xuding-msft_0-1597887553922.png

 

Another is without SSO. It is fixed. If you meet this scenario, please try again to check if it is working on your site.

v-xuding-msft_1-1597887704575.png

 

 

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors