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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

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

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

that should do it!

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

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

that should do it!

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.

Anonymous
Not applicable

Nice!

lbendlin
Super User
Super User

Push your switch statement into a variable

 

then 

 

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

HI @lbendlin 

 

__Cost K$ =
var _CostK = DIVIDE(CALCULATE(sum('Fact'[Allocation]), 'Fact'[Measurement] = "PH"), 1000) + 0
RETURN
IF(0.00 + _CostK = 0.00,"-")

 

I m trying this measure but its not working .

 

nehamaru1985_0-1726123051873.png

Getting this issue could you please help .

https://community.fabric.microsoft.com/t5/Desktop/Replace-blank-value-with-hyphen-giving-error/m-p/4...

 

I have posted my question here please help me to reply there.

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.