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
Anonymous
Not applicable

DIVIDE Too many arguments

Hello,

 

I am trying to complete my DAX function which includes IF and DIVIDE functions

 

Sales Discount = IF(FinOutLine[discount_type] = 1 && FinOutLine[type_program] = "SalesOrderLine" && FinOutLine[k_fin_out_line_id_parent] = BLANK()
;DIVIDE(FinOutLine[price_sales_total];1-(FinOutLine[discount]/100);FinOutLine[price_sales_total];0;
IF(FinOutLine[discount_type] = 2 && FinOutLine[type_program] = "SalesOrderLine" && FinOutLine[k_fin_out_line_id_parent] = BLANK()
;FinOutLine[discount]
;BLANK()
)

With this function I am getting the error Too many arguments were passed to the DIVIDE function. The maximum argument count for the function is 3.

 

This error appreared when I start using the DIVIDE function.

The divide function is a calculation for the sales price before discount.

 

Thanks!

 

 

2 ACCEPTED SOLUTIONS
v-danhe-msft
Employee
Employee

Hi @Anonymous,

Due to I could not reproduce your problem, I have entered some sample data, it seems the error is due to the third parameter in the DIVIDE function, I have modify it as a number(1), it could work like the picture below, you could refer to this link:

https://msdn.microsoft.com/en-us/query-bi/dax/divide-function-dax

1.PNG

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Thank for your reply, I will check this solution.

 

Best regards,

 

Leon

View solution in original post

2 REPLIES 2
v-danhe-msft
Employee
Employee

Hi @Anonymous,

Due to I could not reproduce your problem, I have entered some sample data, it seems the error is due to the third parameter in the DIVIDE function, I have modify it as a number(1), it could work like the picture below, you could refer to this link:

https://msdn.microsoft.com/en-us/query-bi/dax/divide-function-dax

1.PNG

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thank for your reply, I will check this solution.

 

Best regards,

 

Leon

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.