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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not 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])))
 
talal_007_0-1682507906770.png

 

 
 
1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

instead of IFERROR use DIVIDE - it handles these scenarios gracefully.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Yes i figured it on my own as well after only an hour after posting the problem. Divide works great for this problem.

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

 

If 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

lbendlin
Super User
Super User

instead of IFERROR use DIVIDE - it handles these scenarios gracefully.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.