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
powerbbbuuuuu
Frequent Visitor

Error: (step 'Source') references other queries or steps, so it may not directly access a data sourc

I have a power query as follows:

 

Source = Text.Start(List.Accumulate(List.Distinct( #"perVM (2)"[crmID]), "" , (state, current) => state & "u_correlation_id=" &current & "^OR"),Text.Length(List.Accumulate(List.Distinct( #"perVM (2)"[crmID]), "" , (state, current) => state & "u_correlation_id=" &current & "^OR")) -3),

 

The first half before "Text.Length", gets the format of the string that I wanted it to be ( I've referenced other tables which was "perVM"[crmID]. The second half which starts from "Text.Length" till the end basically just ignores the last three characters that I do not need.

 

The above query intended to form the request params in the to call for the API. When I used it to call the API, it gives me the error in the heading.

 

How should I solve this issue?

 

Thanks

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi @powerbbbuuuuu 

your expression does exaclty what you described.

I tested in two form, using a dummy list:

1) yours as you wrote

2) alternative form

              Text.BeforeDelimiter(List.Accumulate({"c1","c2","c3"}, "" , (s, c) => s & "u_correlation_id=" &c & "^OR"),"^",{0,RelativePosition.FromEnd}).

 

MAy be the problem is in the next line!?!?

I think this error is relates to not being able to use the value generated from other query as the parameter for the web request?.

 

The query that I used generated a single string. -> Then I turned it into a list contains only single cell -> added this cell as query parameters -> queried the api with this value -> got me the error that I mentioned in the heading.

 

Any idea on this ?

 

 

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