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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
sandipghosh2
New Member

IsNothing is not working for me

Hi,

I am using below expression:

It is not working for me. When I have value in M3_Gross_Sales_Contract_Entity.Value, it is showing % value.

 

I am also using below expression:

IIF(SUM(Fields!M3_Gross_Sales_Contract_Entity.Value) = 0 AND Fields!M3_Gross_Sales_Contract_Entity.Value="", 1,
(Sum(Fields!M4_Gross_Sales_Contract_Entity.Value, "Main")-SUM(Fields!M3_Gross_Sales_Contract_Entity.Value, "Main"))/SUM(Fields!M3_Gross_Sales_Contract_Entity.Value, "Main"))

 

when I have value in M3_Gross_Sales_Contract_Entity field, it is showing %value , but when there is no value in: M3_Gross_Sales_Contract_Entity, it is showing #error

 

Thanks,

Sandip

 

1 ACCEPTED SOLUTION
hackcrr
Super User
Super User

Hi, @sandipghosh2 

You can use IIF statements or the IIf function in Paginated Reports to check for those conditions before performing the division. Here's an updated version of your expression:

=IIF(
    SUM(Fields!M3_Gross_Sales_Contract_Entity.Value, "Main") = 0 OR IsNothing(Fields!M3_Gross_Sales_Contract_Entity.Value), 
    0,  -- Or you can return a default value such as "N/A"
    (SUM(Fields!M4_Gross_Sales_Contract_Entity.Value, "Main") - SUM(Fields!M3_Gross_Sales_Contract_Entity.Value, "Main")) / SUM(Fields!M3_Gross_Sales_Contract_Entity.Value, "Main")
)

 

View solution in original post

1 REPLY 1
hackcrr
Super User
Super User

Hi, @sandipghosh2 

You can use IIF statements or the IIf function in Paginated Reports to check for those conditions before performing the division. Here's an updated version of your expression:

=IIF(
    SUM(Fields!M3_Gross_Sales_Contract_Entity.Value, "Main") = 0 OR IsNothing(Fields!M3_Gross_Sales_Contract_Entity.Value), 
    0,  -- Or you can return a default value such as "N/A"
    (SUM(Fields!M4_Gross_Sales_Contract_Entity.Value, "Main") - SUM(Fields!M3_Gross_Sales_Contract_Entity.Value, "Main")) / SUM(Fields!M3_Gross_Sales_Contract_Entity.Value, "Main")
)

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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