+ Reply to Thread
Results 1 to 8 of 8

#RIF! inside formulas after every refreshing Power Query

  1. #1
    Registered User
    Join Date
    09-17-2022
    Location
    Milano
    MS-Off Ver
    Office 2021
    Posts
    4

    #RIF! inside formulas after every refreshing Power Query

    Good morning everyone.
    I will try to be exhaustive in explaining this Excel drawback.
    I have created an Excel model that through PowerQuery appends and modifies about 150 .txt files contained in a folder.

    I don't think the details of the files are imported but they are made of 4 columns with thousands of rows with
    state + country + zipcode + number of inhabitants

    After appending the files I generate a table with as many rows as there are files and 3 columns of
    state + country + zipcode attributes.

    Once I have made my changes in PowerQuery I load the generated table in the Excel sheet and to the right of it I build a model with calculated columns that will be part of the same table element.
    Many columns are VLOOKUP or SUMIF on the zipcode column--> the key.
    Up to here everything is ok.
    The problem is that often when I update the model and add txt files or replace files in the folder, the columns on the right of the table generated by the query ((therefore from the 4th column onwards)) generate an error. The error is dictated by the fact that the internal reference of the VLOOKUP or SUMIF formulas is deleted by displaying #REF! .. even if the column to which they refer named ZIPCODE always exists without any modification.
    I can't solve this problem .. do you have any ideas?

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: #RIF! inside formulas after every refreshing Power Query

    Power Query doesn't work with "inner" formulas anyway it's hard to say something without any example
    Last edited by sandy666; 09-17-2022 at 05:02 PM.

  3. #3
    Registered User
    Join Date
    09-17-2022
    Location
    Milano
    MS-Off Ver
    Office 2021
    Posts
    4

    Re: #RIF! inside formulas after every refreshing Power Query

    Hi,
    it's really difficult for me to upload the entire model..
    I've other model where I use in a stable way formulas that link into tables column give by Power Query..

    The strange thing is that the formulas give me error are not the same between refreshes,...

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,412

    Re: #RIF! inside formulas after every refreshing Power Query

    1. You need to provide a SAMPLE workbook that shows the issue.
    2. Please update your profile - 21 is not clear (is it Excel 2021?).
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,445

    Re: #RIF! inside formulas after every refreshing Power Query

    Have you used absolute referencing in your formulas?
    This being said there are lot of examples out there where VLOOKUP and SUMIF can be accomplished using Power Query, without need for external formulas.
    Without seeing data, difficult to provide more help at this stage
    Last edited by Pepe Le Mokko; 09-18-2022 at 06:26 AM.

  6. #6
    Registered User
    Join Date
    09-17-2022
    Location
    Milano
    MS-Off Ver
    Office 2021
    Posts
    4

    Re: #RIF! inside formulas after every refreshing Power Query

    Hi,
    thanks for all your suggestion but I've been able to solve the issue.
    The key point is that I initially build the table with all formulas without the connection with Power Query, once I built the formulas and test if model worked I've subsitute the first 3 colum with the output query of power Query having the same data structure.
    Now I've just tried to rebuild the entire model from scratch starting with the Power Query Table.. after that I tried to test tha same situation in wich a refresh of the datas leads to a #RIF! into formulas and... It'S works!
    The model built with Power Query Table since beginning continue to works without problem unlike the previous version even if at data level are the same!

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: #RIF! inside formulas after every refreshing Power Query

    without example I cannot agree or not agree with this method but if it works that's fine. Good Luck

  8. #8
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,445

    Re: #RIF! inside formulas after every refreshing Power Query

    Based on your last post it seems that you are satisfied with the solution(s) you've received/found but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Refreshing Power Query data every 1 or 2 seconds instead of 1 minute
    By Hein Htut Oo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-23-2022, 02:09 PM
  2. Replies: 2
    Last Post: 02-22-2022, 06:33 PM
  3. Replies: 0
    Last Post: 06-28-2021, 04:01 PM
  4. [SOLVED] Prevent user from refreshing power query
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2021, 06:01 AM
  5. Update pivot tables without refreshing power query
    By Acceptablerisk in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-25-2019, 04:48 AM
  6. [SOLVED] Refreshing only one power query query
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-08-2019, 06:37 AM
  7. refreshing in power query
    By BORUCH in forum Excel General
    Replies: 3
    Last Post: 11-07-2017, 12:04 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1