Power Query if Statements incl. Nested ifs, if or, if and

Mynda Treacy

March 23, 2023

Power Query if statements, nested if, 'if or' and 'if and' statements are a bit different to writing IF formulas in Excel, but once you get the hang of them they’re pretty easy.

In fact, the Power Query IF formula, IF OR, and IF AND are even easier than the Excel equivalents.




Watch the Video

Subscribe YouTube

Download the Excel File

Enter your email address below to download the sample workbook.

By submitting your email address you agree that we can email you our Excel newsletter.

Power Query if Statements

Note: this tutorial assumes you already know how to write Excel IF, IF(OR and IF(AND formulas. If you don’t then here are the links to tutorials on IF formulas and IF(OR and IF(AND formulas. It also assumes you’re familiar with loading data into Power Query and adding Custom Columns. If not then you can learn Power Query here.

Ok, let’s look at an example; below we have some Orders data in Power Query.

Example of Orders in Power Query

We want to add a ‘Delivery Status’ column to indicate whether the order has been delivered.

The logic in English is, if the delivery date column is not blank, then the order has been Completed.

On the Add Column tab of the ribbon click Conditional Column.  The dialog box opens (see below) with an easy point and click menu to help you build the ‘if’ statement (note: ‘null’ in Power Query means blank or empty):

Power Query if Statements

Notice how you can read the ‘if’ line in the dialog box and it actually makes sense in English?

Digression: Maybe one day Excel formulas will catch up and we’ll be blessed with a similar dialog box.

And we’re back; after clicking ‘OK’ we now have a new column for the Delivery Status:

new column for the delivery status

And if you inspect the M code in the Advanced Editor you can see the formula below has been written for you (highlighted in blue):

Power Query if Statements formula in the advanced editor

So, you can see that a regular Power Query if statement is dead easy to create with the Conditional Column GUI.

Unfortunately you can’t use the Conditional Column for every ‘if’ scenario. Sometimes you’ll have to use the Add Custom Column dialog box (see next example), and write them yourself. In which case you should be aware of the key differences to the Excel IF Statement, namely:

  • The ‘if’ in Power Query is lower case
  • Instead of commas separating the value_if_true and value_if_false arguments we have the words then and else (in lower case).
  • null means blank in Power Query
  • Power Query formulas are case sensitive

Power Query if or Statements

Did you notice that the example above doesn’t allow for customers who come into the store and collect their own orders? These are the ‘In Store Pickup’ order types.

power query if or statements

So what we actually need here is an IF OR statement.

The logic in English is: if the delivery date column is not blank OR the Order Type is ‘In Store Pickup’, then the order has been Completed.

Unfortunately there isn’t a nice GUI to help us write the ‘if or’ statement so in this case we use the Add Column tab > Add Custom Column button:

add custom column

The dialog box opens and you have to give your column a name and then type your formula into the ‘Custom column formula:’ field:

custom column formula

Let’s look at the formula more closely:

if  [Delivery Date] <> null or  [Order Type] = "In Store Pickup"  then "Completed" else null

In English the above formula reads:

If the Delivery Date is not blank or the Order Type is ‘In store Pickup’ then return ‘Completed’ otherwise leave the cell blank

Each logical test is separated by ‘or’. Nice and easy, eh!

Power Query if and Statements

Power Query ‘if and’ statements are equally easy.  Let’s look at an example using some employee salary data shown below:

employee salary data

We want to add a column to calculate bonuses for the Executive level employees.

The logic in English is: if the Level is Executive AND the Target Met is Yes, then calculate the bonus as Salary x 5%, otherwise zero bonus.

As with the ‘if or’ statement, we have to use the Add Column > Add Custom Column dialog box to write this formula:

if [Level] = "Executive" and [Target Met] = "Yes" then [Salary] * .05 else 0

And you can see the results in the Bonus column below:

bonus column

Holdup, what about bonuses for the Managers? Actually, the managers get 10% bonus if they meet their targets.

We can accommodate two levels of bonus using a nested if statement.

Power Query Nested if Statements

Using the same sample data our logic in English reads: if the Level is Executive AND the Target Met is Yes, then calculate the bonus as Salary x 5%, otherwise if the Level is Manager AND the Target Met is Yes, then calculate the bonus as Salary x 10%, otherwise zero bonus.

And the formula is:

if [Level] = "Executive" and [Target Met] = "Yes" then [Salary]*.05 else

if [Level] = "Manager" and [Target Met] = "Yes" then [Salary]*.10 else 0

The key is to put the next ‘if’ statement after the first ‘else’. I’ve wrapped the formula onto two lines so it’s easier to see the nesting. You can continue nesting ‘ifs’ after each ‘else’.

More Power Query

Get started with our Introduction to Power Query tutorial.

Click here for more Power Query tutorials on our blog.

And if you want to get up to speed quickly please check out my Power Query course.

83 thoughts on “Power Query if Statements incl. Nested ifs, if or, if and”

  1. Hi Mynda,

    Is there a way to change only certain cells in Power Query from positive to negative? For example, I have my column Revenue, and there are only about 4-5 accounts that should be negative (contra assets). How would I be able to do that? If I change each cell individually would it change it going forward once new data for next month comes in?

    Thanks,
    Michael P.

    Reply
    • Hi Michael,

      There’s a few ways you can do this, but probably easiest is to create another table with the chart of accounts in one column and then the sign: 1 or -1 in the next column. You can merge the tables in Power Query to bring in the sign column which can then be multipled by the revenue.

      If you get stuck please post your question on our Excel forum where you can also upload a sample file and we can help you further.

      Mynda

      Reply
  2. Blessed with that dialog box!?!?!?! Its a POS – cant nest, can use boolean operatos… cant wait to never see it again. Trying to get rid of it for good

    Reply
    • Hi David,

      I agree, the dialog box is only good for basic nested if statements. I use the ‘Add Custom Column’ dialog to write my own if statements when I need more flexibility. Hope that helps.

      Mynda

      Reply
  3. Hi .
    I have a list in excel of more than 1200 post codes and the area they belong to (2 columns in the excel). I am using direct query in power bi and I have one column in the Power BI desktop which is the post code only. Would it be possible to add a customize column with more than 1200 if statements writing them in M language so I can match the list I have with the post codes that I have with the name of the Area they belong to ? if this doesn’t work then do you have any other idea or solution?

    Thank you in advance for your help. K

    Reply
  4. Hello Mynda,
    I am using this formula:
    =if[Status]=”CLOSED” or [Status] = “RESOLVED” then
    if [DateChanged]-[DateOpened] = 0 then “Same Day” else [DateChanged] – [DateOpened] else “Still Open”)

    This is supposed to do the same as this Excel formula:
    =IF(OR([@Status]=”CLOSED”,[@Status]=”RESOLVED”),IF([@DateChanged]-[@DateOpened]=0,”Same Day”,[@DateChanged]-[@DateOpened]),”Still Open”)

    So, if the status is “CLOSED” or “RESOLVED” and if DateChenged-DateOpened=0 the result should be “Same Day” else the result of DateChanged-DateOpened. else “Still Open”

    The Excel formula gets the correct results. However, the custom column formula gives me the “Still Open’ where it should but I get the numerical result of DateChanged-DateOpened regardless of the value (I should get “Same Day” if the result is zero).
    Also, as my results are a mixture of numbers and text, the numbers appear as 1.00:00:00.
    How can I format them as whole numbers without my text showing as null or error.

    Thanks for your help.
    Terry

    Reply
    • Hi Terry,

      Your Power Query ‘if’ formula doesn’t have a test for DateChenged-DateOpened=0.

      = if [Status] = "CLOSED" or [Status] = "RESOLVED" and [DateChanged]-[DateOpened]=0 then [DateChanged]-[DateOpened] else "Still Open"

      Mynda

      Reply
      • Hello Mynda,
        Thanks for the quick reply.
        [DateChanged]-[DateOpened]=0 is supposed to result in “Same Day” if it is greater than 0 it is supposed to result in [DateChanged]-[DateOpened]
        If [Status] doesn’t = “CLOSED” or “RESOLVED” the outcome should be “Still Open”
        Terry

        Reply
        • I think the order of the logical tests should be rearranged:

          = if [Status] = null then "Still Open" else if [DateChanged]=[DateOpened] then "Same Day" else  [DateChanged]-[DateOpened]

          If you’re still stuck, please post your question on our forum where you can upload a sample file with all permutations of outcomes and we can help you further.

          Reply
  5. I love the article, but I’m stuck. I need to do multiple if statements and I’m not able to get beyond the first one.

    each if [Length] = :10 then [Rate]/0.50 else [Rate] is working fine. But I need to add additional conditions after that…

    [Length] = :15 then [Rate]/0.65
    [Length] = :30 then [Rate]

    How do I build them into the first statement?

    Reply
    • Hi Boyd,

      Did you see the example under the heading “Power Query Nested if Statements”?

      if [Length] = :10 then [Rate]/0.50 else if [Length] = :15 then [Rate]/0.65 else if [Length] = :30 then [Rate]

      Mynda

      Reply
  6. Hi Mynda

    Great help this article has been and myonlinetraininghub is now a regular feature on my google hitlist, Kudos to yourself and team

    I am particularly interested in finding out how do we reference contents of existing columns in Power Query

    Let’s say I want if [product_name] = “XYZ” then “ABC” else (bring whatever is there in [product_name] column), how do I achieve that?

    Regards
    Jawad

    Reply
    • Hi Jawad,

      Great to hear you’re enjoying using Power Query. You can write the formula like so:

      = if [product_name] = “XYZ” then “ABC” else [product_name]

      Mynda

      Reply
      • Thanks for the timely response

        I applied that through custom column now and it’s working fine. Previously I was trying [product_name] syntax in conditional column GUI screen where it always read it as a text

        Thanks to your blog, I was able to find another work around, instead of adding a new column I transformed existing one with Find and Replace By option to change selected entries there

        Regards

        Reply
      • I am getting errors all though I follow the same methodology.

        if [FACILITY ACRONYM] =”#N/A” or ” ” then [ACCOUNT NAME] else [FACILITY ACRONYM]

        so the formula is working but if it doesn’t match it’s giving me an error than the value from the facility acronym

        Reply
        • Hi Dee,

          I can’t help you debug without seeing your file or at least a screenshot. Please post your question on our Excel forum where you can also upload a sample file and we can help you further.

          Mynda

          Reply
  7. This tutorial is great and use it all the time. Is it possible to write an if/then statement by simply adding it to the Mcode? Without adding a customer column?

    Reply
    • Yes, but where are you putting the results of the ‘if then’ statement? I wouldn’t be concerned with adding more columns, it makes little difference to Power Query’s efficiency.

      Reply
  8. My version of Power Query (Excel 2016) doesn’t have the Conditional Column option. It’s just not there!

    Have they moved (aka hidden) it?

    Am I missing a component?

    Thanks

    Reply
  9. Hi Mynda,

    I am trying to add custom column with the below formula, but its showing error, Its throwing the error on “then”

    If [Column2] = “null” and [Custom.6] “null” then [Column1] else null

    Kindly Clarify

    Reply
  10. Hi Mynda and thank you for the great explanation!!!
    Could you please show me how to insert Year(today()) into a nested if statement in powerquery?.

    This is more or else what i was crafting;
    ……………………………and Date.Year[Processed Date]Year[DateTime.LocalNow()] then “Remove” else
    “Stay”

    Reply
  11. Hi I have 3 columns which has column data as eligible,noneligible,donotrecognize,obsolote and blanks. Based on the different conditions i have to create a custom column. So how can i chack if the column is blank or not? I tried by checking the condition as null but it is not giving the required results

    Reply
  12. Hi Mynda,

    Maybe I was not clear enough.
    I would like to put some data into TWO columns when condition is true.

    Maybe example will be useful. We have filled in column describing child and whant to assign in one step /ONE/ toy and /TWO/ clothing (Col_Toy, Col_Cloath are null now).

    if [Col_Child] = “Boy” then Col_Toy1 = “Car” AND Col_Cloath = “Trousers” else
    if [Col_Child] = “Girl” then Col_Toy1 = “Doll” AND Col_Cloath = “Skirt”

    Thanks
    Robert

    Reply
  13. Thanks for your job – this is Power to know 🙂

    I was wondering how to make make 2 ‘actions’ for some comdition THEN.

    if [Column1] = “A” then [Colmun2] = “B” and [Column3] = “C”

    Robert

    Reply
    • Hi Robert,

      I’m not sure what you mean, sorry. Your formula reads if column1 = A then column2 = B AND column3 = C. Do you mean if column1 = A AND column2 = B AND column3 = C?

      Mynda

      Reply
  14. Struggled with a monthly Cyrstal report saved into excel for over a year. Time spent copying and pasting then struggling to create a macro to speed up a process. Finally I started recently dipping my toe into power pivot/power query thinking there has to be a better way.

    Something in this blog clicked for me. I applied some of this to my process, and magic happened. Hours of time down to about 10 minutes setting up the query. I’m sure next month it will less than that.

    Thanks for inspiring me and I really appreciate your blog posts

    Reply
    • Wow! Fantastic to hear, Steve. I think you have scratched the surface of Power Query and are already reaping the rewards. Keep going with your learning of Power Query because there is so much it can do.

      Reply
  15. These tips are great! I did an if and/or, multiple or’s and multiple and’s, I had two put insert brackets to control the execution of two or’s:
    if [#”Field 1″] = “Condition 1″ and [#”Field 2”] = “Condition 2”
    then
    “Option A”
    else
    if [#”Field 1″] = “Condition 1″ or
    [#”Field 1”] = “Condition 3″ or
    [#”Field 1”] = “Condition 4″ and
    ([#”Field 2”] = “Condition 5″ or [#”Field 2”] = “Condition 6”)
    then
    “Option B”
    else
    if [#”Field 1″] = “Condition 7″ or [#”Field 1”] = “Condition 8”
    then
    “Option C”
    else
    if [#”Field 1″] = “Condition 9″ or [#”Field 1”] = “Condition 10”
    then
    “Option D”
    else
    [#”Field 1″])

    Reply
    • Glad it was helpful, Julio. Looks like your field 2 condition is an ‘and either or’, which is why it requires the brackets. Well done figuring it out.

      Mynda

      Reply
  16. Hello,

    I have stumbled upon a small issue. I have a query that imports data from web csv file, for example:

    COLUMN1 – COLUMN2
    England London
    France Paris
    Spain Madrid

    What i need is to add a conditional column that will ask each time query gets loaded if there are any changes in COLUMN2. If there are, then it needs to write it down in COLUMN3 (example below):

    COLUMN1 – COLUMN2 – COLUMN3
    England Newcastle London
    France Paris
    Spain Madrid

    Reply
    • Hi MJ,

      Power Query can’t detect changes. It just gets the data you connect to and displays it in the table. It doesn’t keep a record of how the data appeared prior to refresh. You’d have to close & load the data to a table (I’ll call this Table2) and then unlink the Table2 query and re-query Table2 for comparison to the latest view of the data.

      Mynda

      Reply
  17. Hi Mynda,
    Thanks for the articles. I find many of them useful.

    Do you know of a way to do If [Column] contains a certain text in Power query? I have a query where there is a string of letters and numbers as unique identifier like:
    PTN123456789 08/19/2018 123.45
    PTN234567890C 08/19/2018 -24.78
    PTN234567890D 08/19/2018 24.78

    I need to pull the C or D out of the first column into a custom column. If there is nothing, I need the result to be nothing.

    Thank you.

    Reply
  18. Looking to Address a set of criteria “The Accountabilities for determination of tolerable risk levels sit with varied levels of management.”, using Yes, No, Not applicable. I am using the following.

    =IF(ISBLANK(E5),””,(IF(E5=”yes”,”No Action Required”,IF(E5=”N/A”,”Not Applicable”,”IF(E5=”no”,”HSMP does not address accountabilities for determination of tolerable risk levels sit with varied levels of management.”))))

    Can anyone assist as I cant get the formula to work

    Reply
    • Hi Adam,

      This is an Excel formula, but you’ve posted your question on a Power Query tutorial. Are you after an IF formula for Excel or Power Query?

      Mynda

      Reply
  19. Mynda, I’m trying to do something very similar. My formula is

    =If [Appl] = “Y” or [Appl2] = “Y” then “Y” else null

    When I enter this into the Power Query Custom Column formula dialog box, I get an error “Token Eof expected” and it flags the word “then” if I select Show Error. Any idea what I’m doing wrong?

    Reply
      • Thanks for the quick reply, Catalin. I have determined that the issue was not the parenthesis; rather it seems to be related to the complexity of the query and perhaps memory usage within Excel. In case it may help others out there, I have listed below what I did to resolve the issue.

        Your suggestion produced the same error. It also happened if I used braces rather than parentheses.

        I got the same result without the OR operator; i.e., if I just typed

        =If [Appl] = “Y” then “Y”

        I got the error once I type “then” with “then” flagged.

        I had been trying to add this step to the bottom of an existing Merge query.

        I then tried referencing other columns in the query. Same result. I tried constructing a new query from an existing table, referencing a numeric column and another referencing a text column; same result both times.

        Next, I shut down Excel and restarted it; same thing. So I rebooted the computer. Same thing.

        Next, rather than adding this step to the bottom of the existing query, I tried loading the table from the Merge query into a new query with the If statement as the next step in the new query. Now it works as per Mynda’s original post. However, if I again try to add the step to the bottom of the previous merge query, I again get the error.

        I suspect that this may be related to the complexity of the original query, which was a merge of two previous merge queries, which in turn were derived from other queries. Refreshing the final query takes a few minutes. I have noticed in the past that when dealing with large, computationally-intensive files, that Excel can get confused and things quit working as expected. I usually see this manifested as non-working menu items.

        For reference, I am using Office 356 ProPlus V 1708 and Win 7.

        Reply
  20. Your summary is quite helpful to me as I learn Power Query. I have an nested if statement that I am trying to create within the custom column option. I hope maybe you can help me with my syntax? I want my tests to verify if my first condition is true, then I want to verify 7 OR statements as my second condition (all 7 OR statements must be tested to determine if true). If condition 1 and condition 2 are both true then I want to return a successful value. Else if both condition1 and condition2 are both false then return a zero/false. The problem I am having is the AND IF between condition1 and condition2. Here is what I am trying to write with errors (the / is a remark):

    if ([Recommendation] = “DC”) /condition1

    and /condition2

    if [R1N] > 2 and [R1N] 2 and [R2N] 2 and [R3N] 2 and [R4N] 2 and [R5N] 2 and [R6N] 2 and [R7N] < 11

    Then "YES" /both condition1 and condition2 must be true for "YES"

    else "NO"

    Reply
    • Hi Mike,

      Your second condition has no logical test for [RIN] through [R6N]. I presume it should be like this:

      if [Recommendation] = "DC" and [R1N] > 2 and [R1N] = 2 and [R2N] = 2 and [R3N] = 2 and [R4N] = 2 and [R5N] = 2 and [R6N] = 2 and [R7N] < 11 then "Yes" else "No"

      Mynda

      Reply
  21. Thanks for your clear explanation. I have been reading your blog to enhance my excel skills and I found it’s very useful and it helps me a lot with my work.

    Here’s I had custom column with function below but it didn’t work. Could you please help to me to check what is the mistake?

    What I want to do is to change the last digit of price into 9, i.e. 299 to 298, 123.14 to 129 , 234.8 to 239, etc…

    = if Number.Round([price],0,RoundingMode.Up)=299 then Number.Round([price],0,RoundingMode.Up)-1 else if Text.End(Number.Round([price],0,RoundingMode.Up),1)>”9″ then Number.Round([price],0,RoundingMode.Up)+9 else Number.Round([price],0,RoundingMode.Up)+9-Text.End(Number.Round([price],0,RoundingMode.Up),1)

    Pls kindly advise and let me know your comment. Thanks.

    Reply
    • Hi Sarah,

      The only thing that jumps out at me is the 9 in double quotes. Presumably this is a number so it shouldn’t have the double quotes around it?

      Otherwise it would help if you share the error message as well. If you’re still stuck, please post your question on our Excel forum.

      Mynda

      Reply
  22. great job. below is the example I worked for multi if with and
    if Date.DayOfWeek([orderDate])=0 and Date.WeekOfYear([orderDate])-1>9
    then Number.ToText(Date.Year([orderDate]))&”-“&Number.ToText(Date.WeekOfYear([orderDate])-1)

    else if Date.DayOfWeek([orderDate])=0 and Date.WeekOfYear([orderDate])-1<10
    then Number.ToText(Date.Year([orderDate]))&"-0"&Number.ToText(Date.WeekOfYear([orderDate])-1)

    else if Date.DayOfWeek([orderDate])0 and Date.WeekOfYear([orderDate])<10
    then Number.ToText(Date.Year([orderDate]))&"-0"&Number.ToText(Date.WeekOfYear([orderDate]))

    else Number.ToText(Date.Year([orderDate]))&"-"&Number.ToText(Date.WeekOfYear([orderDate]))

    Reply
  23. I am trying to put an “if x and y then “64” else if” statement in the middle of a long “if then else if then” and while I’m not getting an error it does effect the table at all. the query seems to skip the step all together.
    Here is the code I’m working with specifically the
    [STATUS] = “CHARGE OFF” and [Current Balance] = “0” section of the code I have tried it in a lot of different combinations and orders but none have produced the “64” that I am looking for.
    {
    = Table.AddColumn(#”Changed Type3″, “Account Status”, each if [STATUS] = “REPOSSESION” then “96” else if [Current Balance] = “0” and [STATUS] = “CHARGE OFF” then “64” else if [STATUS] = “CHARGE OFF” then “97” else if [STATUS] = “PICKED UP” then “95” else if [STATUS] = “RETURNED” then “95” else if [STATUS] = “PAID OUT” then “13” else if [STATUS] = “PAID OUT EARLY” then “13” else if [Actual Days Late] < 30 then "11" else if [Actual Days Late] < 60 then "71" else if [Actual Days Late] < 90 then "78" else if [Actual Days Late] < 120 then "80" else if [Actual Days Late] < 150 then "82" else if [Actual Days Late] = 180 then “84” else null )
    }

    Reply
    • Hi Chris,

      Your ‘and’ criteria is testing for zero as a text value (it’s wrapped in double quotes). I’d say the ‘Current Balance’ column probably contains numbers, not text. Try changing your formula to this:

      if [STATUS] = "REPOSSESION" then "96" else if [Current Balance] = 0 and [STATUS] = "CHARGE OFF" then "64" else if [STATUS] = "CHARGE OFF" then "97" else if [STATUS] = "PICKED UP" then "95" else if [STATUS] = "RETURNED" then "95" else if [STATUS] = "PAID OUT" then "13" else if [STATUS] = "PAID OUT EARLY" then "13" else if [Actual Days Late] < 30 then "11" else if [Actual Days Late] < 60 then "71" else if [Actual Days Late] < 90 then "78" else if [Actual Days Late] < 120 then "80" else if [Actual Days Late] < 150 then "82" else if [Actual Days Late] = 180 then "84" else null 

      You probably also want to remove the double quotes from all the other numbers after your 'then' statement, unless you actually want them as text.

      Mynda

      Reply
      • Thank you so much when it didn’t work the first time without the quotes before I put them in based off of a formula template this works great now .

        Reply
  24. Hi there,

    Is it possible to bypass the 2,000 row limit when connecting to salesforce reports?

    Currently, power query only syncs a maximum of 2,000 rows of data when connecting directly to salesforce reports. This is a huge challenge as I need to create multiple salesforce reports and append them together in excel to create a mast list. I understand the object connector can bypass this limit but I need the functionality of the complex filter logic salesforce reports provides.

    Anyone have some sort of solution for this?

    Thanks!

    Reply
  25. Great & Thanks Mynda for this trick as I was making mistake while writing “IF” formula by custom column in capital letter, as per the practice of normal Excel formula. Power Query formula are case sensitive…just reminded me that☺

    Reply
  26. I have a power query(plug in for excel) that gets its data from Sales Force. I share this file with different users, But when the users use the file, and try to refresh the data they get the pop appears the next message [expression Error] The column amount (converted) of the table wasn’t found. Comes from the report of sales force

    Reply
    • Hi Ruth,

      I presume you have opened the file from Sales Force that Power Query is trying to get and checked that it has the column in question?

      Mynda

      Reply
      • Hi 🙂 Mynda.

        The file is connected to salts force directly but when you save the changes and execute the update of the query does not find the column

        Reply
        • Hi Ruth,

          Does that user have permission to see that column in SalesForce or is there are user restriction? What happens if you login to their PC and try to refresh the query?

          Mynda

          Reply
          • Hi Mynda

            I created the files linked from sales force with my user and access worked normally with excel with the query. Is there a possibility that some office update can damage the links of the query?

            These are the messages in the different files.

            [Expression.Error] The column ‘Importe(convertido)’ of the table wasn´t found.
            [DataSource.Error] Web.Contents failed to get contents from ´https://eu5.salesforce.com/services/datav29.0/analytics/reports/00O2400000IqBZEAT?includeDetatails=true´(404):Not Found

          • Hi Ruth,

            It looks like a SalesForce issue, as the 404 error is returned when a web page isn’t available. Maybe the user login credentials for SalesForce weren’t correct, or the SalesForce link was invalid. When you created the query again was the link different to the one above in the error message?
            Mynda

          • Hi Ruth,
            Is that parameter correct: ?includeDetatails=true
            Normally, it should be ?includeDetails=true
            Catalin

    • Hi Ruth,

      I believe the answer is you cannot share edited power query’s unless you have purchased Office 365. You will need to start over on their computers.

      Reply
      • Hi Rueben,

        Office 365 doesn’t not discriminate like this. I believe Catalin spotted a typo on Ruth’s query which was causing the problem.

        Mynda

        Reply
        • Hello everyone

          Thanks for your help I found the problem was the language issue in the reports were created in Spanish and then English re-creates the reports and everything worked.

          regards

          Reply
  27. Another great article. Thanks for sharing!
    Btw, I don’t have “Conditional Column” in my Power Query… it’s time for me to update my Power Query version. ;p
    Cheers,

    Reply
  28. Hi Myrna, I am thoroughly enjoying the Power Query course the videos and exercises are a great way to learn. I will now digress and work through this tutorial – it looks very interesting to say the least.
    Regards,

    John

    Reply
  29. Very well explained. I had one query in using this. if Column 1 has contents (Text and numbers both) and if we want to fill only text below it wherever the numbers are present until you reach a text. I tried using the above guidelines, but could not. Could you please guide?

    Thank you in advance.

    Reply
  30. These are wonderful examples and yes, I will be taking your Power Query class shortly. Thanks again for your work in this area.

    Reply

Leave a Comment

Current ye@r *