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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
StaceyGriffeth
Helper II
Helper II

Display hyphen instead of blank

Hello,

 

I have BI financial statements and would like to have a hyphen display instead of a blank in case of no data or zero value.  Below is an example of the financial statement:

 

xfinancialstatementpng.png

The columns of numbers are each a measure with a switch statement such that the value for each row is a separate measure.  Here is the measure for the column "AUG 2020":

 

xswitch.png

 

How can I get hyphens to display in the blanks in the table?

 

Thanks for your help.

 

- Stacey

1 ACCEPTED SOLUTION
watkinnc
Super User
Super User

You could wrap each of the switch statements with IF ISBLANK([Nautic...YTD]), "-", FORMAT(DIVIDE...)

that should do it!


I’m usually answering from my phone, which means the results are visualized only in my mind. You’ll need to use my answer to know that it works—but it will work!!

View solution in original post

6 REPLIES 6
watkinnc
Super User
Super User

You could wrap each of the switch statements with IF ISBLANK([Nautic...YTD]), "-", FORMAT(DIVIDE...)

that should do it!


I’m usually answering from my phone, which means the results are visualized only in my mind. You’ll need to use my answer to know that it works—but it will work!!

Thank you for this suggestion!  I wasn't able to use the "is blank" as in many cases the value was 0, but I was able to do "IF = 0" and get it to return the hyphen.

Nice!


I’m usually answering from my phone, which means the results are visualized only in my mind. You’ll need to use my answer to know that it works—but it will work!!
lbendlin
Super User
Super User

Push your switch statement into a variable

 

then 

 

RETURN IF(0+variable==0,"-",variable)

this works

My switch statement has some intentional blanks (where I want a blank row between figures), so this approach isn't working.  Thank you for offering the suggestion, though.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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