Forum Discussion

AUS2029's avatar
AUS2029
Regular Visitor
7 years ago
Solved

Calculated Columns disappeared after Append Queries

I have three tables with added in calculated columns. ( two had same columns/ heading, one has some same columns/headings with the other 2). 

The purpose is to combine these three tables into one. So, used Append Queries. But the result did not include any Calcuated columns. 

PS. the added columns are result of LOOKUPVALUE. 

how to resolve this?

  • Hi,

     

    DAX formulas (calculated columns or measures) will not be visible in the QUery Editor.  Therefore, you should first append data from th 3 tables, run the Unpivot tansformation step.  Click on Close and Apply and then write your LOOKUPVALUE() function.

5 Replies

  • Hi AUS2029

     

    If I understand correctly, you're performing the 'Append' within Power Query and then adding the calculated column with DAX. 

    You need to do the appending, load the data into the model and then add the calculated column

    • AUS2029's avatar
      AUS2029
      Regular Visitor

      It's Power BI. Below are steps that has taken so far.

      1. get data from excel
      2. add columns using LOOKUPVALUE from a separate table
      3. repeat above for other two tables
      4. Use Append Queries to append three tables which had added columns created from LOOKUPVALUE

       

      Next planned steps after combined/append three tables together

      1. Edit Query
      2. Select columns then Unpivot columns

      the issue I am facing is, the added columns are not showing under Edit Query Table. therefore cannot Unpivot columns.

       

       

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        Hi,

         

        DAX formulas (calculated columns or measures) will not be visible in the QUery Editor.  Therefore, you should first append data from th 3 tables, run the Unpivot tansformation step.  Click on Close and Apply and then write your LOOKUPVALUE() function.

    • AUS2029's avatar
      AUS2029
      Regular Visitor

      Thanks v-chuncz-msft. Just tried Union and Selectcolumns to create a new table. I can view this new Table under FIELDS, but when under Edit Queries, this new table does not show. And I also realised that some other new tables created by Selectcolumns & Union are not showing under Edit Queries environment.