Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
DesktopOwl
New Member

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?

 

DesktopOwl_0-1690491002889.png

 

1 ACCEPTED SOLUTION
DesktopOwl
New Member

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

View solution in original post

3 REPLIES 3
DesktopOwl
New Member

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

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.

 

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?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors