Forum Discussion
Anonymous
3 years agoNot applicable
IFERROR Problem
Formula is very simple it is a sum of variables and then multiplies by a ratio
I have this meausure to compute Total Rev. I am using the IFERROR to counter NAN problem in the calculation. However if I drag and drop another column from another table it gives me an error " Visual Exceeded the available resources." IF I REMOVE THE IFERROR calculation than I don't get this error.
Total_Rev2 = ((SUM('1.Orders (fact)'[CHARGES])+SUM('1.Orders (fact)'[XCHARGES])-sum('1.Orders (fact)'[FSC_CHARGES]))* IFERROR(SUM('1.Orders (fact)'[FUNCTIONAL_AMT])/SUM('1.Orders (fact)'[TOTAL_CHARGES]),0)+(SUM('1.Order Interliner'[AMOUNT])))
instead of IFERROR use DIVIDE - it handles these scenarios gracefully.
3 Replies
- lbendlinSuper User
instead of IFERROR use DIVIDE - it handles these scenarios gracefully.
- AnonymousNot applicable
Hi Anonymous ,
Plesae try this measure.Total_Rev2 = ( ( SUM ( '1.Orders (fact)'[CHARGES] ) + SUM ( '1.Orders (fact)'[XCHARGES] ) - SUM ( '1.Orders (fact)'[FSC_CHARGES] ) ) * IF ( AND ( SUM ( '1.Orders (fact)'[FUNCTIONAL_AMT] ) = 0, SUM ( '1.Orders (fact)'[TOTAL_CHARGES] ) = 0 ), 0, DIVIDE ( SUM ( '1.Orders (fact)'[FUNCTIONAL_AMT] ), SUM ( '1.Orders (fact)'[TOTAL_CHARGES] ) ) ) + ( SUM ( '1 Order Interliner'[AMOUNT] ) ) )Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
- AnonymousNot applicable
Yes i figured it on my own as well after only an hour after posting the problem. Divide works great for this problem.