Forum Discussion

andreyminakov's avatar
andreyminakov
Frequent Visitor
7 years ago
Solved

A cyclic reference error when use #shared

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 ...
  • v-qiuyu-msft's avatar
    7 years ago

    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