Forum Discussion

Matt_Gol's avatar
Matt_Gol
Helper I
4 years ago

Call a column from another table in Custom add Column

Hi All

I have two tables for example tableA and table B.

I would like to add a custom column in tableA which need to call one of columns in tableB for the calculation.

Like, [Qty] from tableA needs to be multiply by [Unit_Cost] from table B to create [Total_Cost] in tableA.

Any help would be highly appreciated. 

5 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      please mark it as a solution 🙂 but not by me - 🙂 

      • Matt_Gol's avatar
        Matt_Gol
        Helper I

        Thanks so much Anonymous , but I have problem with this solution, it doesn't seem to work on DirectQuery. It asked me to switch all the tables to import mode. Is there any other solution that I can apply on the Direct Query mode?

  • Hi Matt_Gol ,

    If the tables are connected in Power BI using DirectQuery mode, creation of calculated columns is restricted. This is one of the limitations of DirectQuery mode in Power BI.

    Rather than creating a caluclated column you will have to create a measure using DAX expression.

     

    If it still does not help, please provide your pbix file without privacy information and your desired output.

     

    Best regards.