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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Saniat
Helper V
Helper V

Alternatives to show BLANK() -- to be able to use this in Metric

Hi,

In some cases, my calculation returns null / blank and is displayed as BLANK().
I wanted to avoid it and converted this as a text e.g. IF( ISBLANK(MyMeasure) , " ", MyMeasure)

I also do not want to report zero instead of null.

Problem with this approach is I then cannot use this field in my Metrics - as it is a text field.

Saniat_0-1678713070421.png


Is there any better way to deal with these BLANK(), so I do not show anything when it is BLANK(), and can also use this field in the Metric ?

Many thanks !

3 REPLIES 3
Saniat
Helper V
Helper V

After some search over the internet, I found a soln to it:
I am using this measure in the color function, and matching the background color when I do not want the BLANK() to be shown:
MyMeasure = 

IF(
    ISBLANK('1'[OtherMeasure])
    , 1
    , 0
)


Saniat_0-1678880672639.png




Saniat_1-1678880791686.png

 

 



Arul
Super User
Super User

@Saniat ,

Do you want to show 0 instead of " "? If yes then add +0 at the end of your measure.

Thanks,

Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Unfortunately I cannot report 0 where I do not want to report, I want to report NULL.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.