Forum Discussion

JSBDodson's avatar
JSBDodson
Frequent Visitor
5 years ago
Solved

Query Help - Create New Column with Value found in Row 1 of Column 2

I have an excel file I am using within Power BI that has a load date in  Row 1 of Column 2.   I have tried to use Create Custom Column using   ```  = #"Changed Type"[Column2]{0}  ```  to  create a ...
  • v-jingzhang's avatar
    5 years ago

    Hi JSBDodson 

     

    I tried your second idea and found a workaround. You could refer to below steps.

     

    1. Right click on the date cell and select Add as New Query.

     

    2. Convert the new query Column2 to List rather than Table.

     

    3. In original table, add a custom column = List.First(Column2). Then you will get the result.

     

    What is strange is that if I extract the date from the original table directly by using "= SampleTable{0}[Column2]" and repeat the last two steps, I will get the same error "Expression.Error: A cyclic reference was encountered during evaluation." I guess if we extract the value from the same query or with reference to the query, it will display this cyclic reference error. However, if we extract the data from an independent query, this error will not appear.

     

    Hope this helps.

     

    Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as the solution to help other members find it.