cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

MDX error message : Expression error: The name 'DIVIDE' wasn't recognized. Make sure it's spelled c

Hi, 

 

I'm trying to use divide function, but I got error message

 

Expression error: The name 'DIVIDE' wasn't recognized.  Make sure it's spelled correctly.

 

my experssion :

= divide ([Unrestricted Stock],[Unrestricted Stock Value],0)

as I'm looking to divide two columns, the denominator some times is zero, so I want the equation to return zero.

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: MDX error message : Expression error: The name 'DIVIDE' wasn't recognized. Make sure it's spell

Hi @Moh_ali_square,

 

>>even the syntex checker is marking green. 

Power query not support these functions, actually the syntax check only check the formula name and parameters type.

 

In power query. you can direct use "/" to calculate with divide; for if statement you should use it like below formula:

if expression then value_if_true else value_if_false

 

Reference:

Insert a custom column into a table (Power Query)

Power Query - Overview and Learning

 

BTW, I'd like to suggest you use the dax formula(report view), it support these functions which you mentioned.

 

Regards,

Xiaxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: MDX error message : Expression error: The name 'DIVIDE' wasn't recognized. Make sure it's spell

Hi @Moh_ali_square,

 

Which type of query you use? Power query or dax query? Can you share some detail content of your issue? (e.g. table structs)

 

BTW, there is not divide function in power query.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Highlighted
Advocate I
Advocate I

Re: MDX error message : Expression error: The name 'DIVIDE' wasn't recognized. Make sure it's spell

Hi @v-shex-msft

 

I am using Power Query.

the error comes for many functions, like divide, IIF, IF. 

even the syntex checker is marking green. 

 

Highlighted
Community Support
Community Support

Re: MDX error message : Expression error: The name 'DIVIDE' wasn't recognized. Make sure it's spell

Hi @Moh_ali_square,

 

>>even the syntex checker is marking green. 

Power query not support these functions, actually the syntax check only check the formula name and parameters type.

 

In power query. you can direct use "/" to calculate with divide; for if statement you should use it like below formula:

if expression then value_if_true else value_if_false

 

Reference:

Insert a custom column into a table (Power Query)

Power Query - Overview and Learning

 

BTW, I'd like to suggest you use the dax formula(report view), it support these functions which you mentioned.

 

Regards,

Xiaxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors