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.
Hi All!
I don't understand why PQ (in both Excel and Power BI Desktop) raises "Expression.Error: A cyclic reference was encountered during evaluation." in the code below. Error is raised regardless of Table.Buffer in the first step (i.e. with the Buffer and without it).
let
Source = Table.Buffer(Record.ToTable(#shared)),
#"Filtered Rows" = Table.SelectRows(Source, each Value.Is([Value], type number)),
Custom1 = List.Buffer(#"Filtered Rows"[Name])
in
Custom1
I can remove List.Buffer, but if I use List.Accumulate instead, the error is raised for still unknown reason, even if it doesn't actually accumulate anything, like List.Accumulate(#"Filtered Rows"[Name], "", (s,c)=>s).
The error starts to be raised only if I filter by Value field, e.g. if I use #"Filtered Rows" step. But the error is raised if I filter the field in anyway, including variants like [Value] = 0.
If I filter by Name, all works without problems. What is the magic with Value field of #shared?
Please help!
Solved! Go to Solution.
Hi @andreyminakov,
The reason it worked when Value.Is as [Name] because when it is type text the value of it is not necessary to pass it to the query.
But when type as number it is necessary to pass the value column as well which makes it to go into an infinite loop.
When you use Value.Is([Value], type number), please add a step before this step to filter out all tables which exist in current report. For example:
Update: In my sample, as other two queries don't have error. You can just filter out current query table, eg:
#"Filtered Rows1" = Table.SelectRows(Source, each [Name]<>"Query1")
But if some other tables contain error, we need to filter out them to avoid issue.
Best Regards,
Qiuyun Yu
Hi Qiuyun! Yes, of course :-).
Hi @andreyminakov,
My pleasure. As the issue is resolved now, may I close this thread?
Best Regards,
Qiuyun Yu
Hi Qiuyun! Thanks a lot for your answer, it's very appreciated!
Hi @andreyminakov,
The reason it worked when Value.Is as [Name] because when it is type text the value of it is not necessary to pass it to the query.
But when type as number it is necessary to pass the value column as well which makes it to go into an infinite loop.
When you use Value.Is([Value], type number), please add a step before this step to filter out all tables which exist in current report. For example:
Update: In my sample, as other two queries don't have error. You can just filter out current query table, eg:
#"Filtered Rows1" = Table.SelectRows(Source, each [Name]<>"Query1")
But if some other tables contain error, we need to filter out them to avoid issue.
Best Regards,
Qiuyun Yu
Hi @andreyminakov,
I have consulted this issue internally, will update here once I get any information.
Best Regards,
Qiuyun Yu
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |