Forum Discussion

bartvana's avatar
bartvana
Iron Contributor
Jul 14, 2021
Solved

#REF error after Power Query refresh

I create a table using a Power Query. Next to this table I added columns with formulas referencing the table (eg. [@ProductRef] or tCalc[@ProductRef]). This works fine until I refresh the Power Query, then I get #REF errors.

I have use the same method in other worksheets, and it works fine there. What could be going wrong in this one?

 

I already tried changing the External Data Properties, didn't help.

 

  • Lorenzo & bartvana 

     

    A power query + data model + power pivot solution can also be considered by creating relationships from supplier table and product table as dim tables (lookup tables) to the  parameter/calc table (fact table) then, display the results into a power pivot especially if supplier/product calculation is high volume would be most efficient.

14 Replies

  • Yea_So's avatar
    Yea_So
    Bronze Contributor

    bartvana 

     

    cannot be done that way, please provide a sample file since power query is a complicated function to explain.

     

    cheers

    • bartvana's avatar
      bartvana
      Iron Contributor

      Thank you for looking into this!

      Attached a simplified sample workbook. Strangely enough, in the sample workbook everything works, while in my real file, which does basically the same, I get the #REF error.

      Still, it would be great if you could look into the sample workbook and advise on best practice.

      • Yea_So's avatar
        Yea_So
        Bronze Contributor

        bartvana 

         

        So var is the price * Qty

         

        Question: I am assuming the PQ result is the fact table? How is that going to work when you switch the parameters from B to A, do a refresh and then when coming back to B and do a refresh the values you entered for the A supplier will disappear.

Resources