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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.