Forum Discussion

DesktopOwl's avatar
DesktopOwl
New Member
3 years ago
Solved

Expression Error: The name DIVIDE wasn't recognized

I am on the Transfrom / Power Query Tab. Trying to Add a column knowing that it wll give me NaN and / or infinity simple, that's why I use the DIVIDE function and return me an error message. There is no error in spelling. Can someone help?

 

 

  • Actually I just found the solution.... just use the quick measure instead of new measure!  🙂

3 Replies

  • Resolutions's avatar
    Resolutions
    Regular Visitor

     

    DesktopOwl The error message "The name DIVIDE wasn't recognized" in Power Query usually occurs when the "DIVIDE" function is not recognized due to an incorrect syntax or because it's not available in the specific Power Query version you are using.

    Instead of using the "DIVIDE" function, you can use the "/" operator directly in Power Query to achieve the same division operation. Here's how you can modify your expression:

     

    Let's say you have two columns named "ColumnA" and "ColumnB" and you want to create a new column that calculates the division result of these two columns. Follow these steps:

    1. Go to the "Add Column" tab in Power Query Editor.
    2. Click on the "Custom Column" button.
    3. In the "Custom Column" dialog box, enter the name of your new column (e.g., "Result").
    4. In the "Custom Column Formula" box, use the "/" operator to divide the values of "ColumnA" by "ColumnB," like this:
    ```
    [ColumnA] / [ColumnB]
    ```
    5. Click "OK" to create the new column.

    This way, you'll perform the division operation directly without using the "DIVIDE" function. The expression `[ColumnA] / [ColumnB]` will calculate the division result for each row in the table.

     

    If you're still encountering issues or if you have a specific requirement that requires the use of the "DIVIDE" function, please ensure you're using the correct version of Power Query that supports it. Some versions might not have this function available, and using the "/" operator can be a suitable alternative in such cases.

     

    • DesktopOwl's avatar
      DesktopOwl
      New Member

      Thanks for this - DIVIDE was used to avoid infinity and NaN error. I tried using MEASURE on Desktop but the calculation does not seem right. Any other tips?

  • Actually I just found the solution.... just use the quick measure instead of new measure!  🙂