Forum Discussion
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!
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
Regards,
Daniel He
- Anonymous8 years ago
Thank for your reply, I will check this solution.
Best regards,
Leon
2 Replies
- v-danhe-msftMicrosoft 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
Regards,
Daniel He
- AnonymousNot applicable
Thank for your reply, I will check this solution.
Best regards,
Leon