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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
nehamaru1985
New Member

Replace blank value with hyphen giving error

HI Everyone,

I am stuck with one issue , I want to replace blank value with "-" and for that i am using below formula

 

__M Cost K$ =
var __MCostK = DIVIDE(CALCULATE(sum('Drivers'[Allocation]), 'Drivers'[Measurement] = "PH"), 1000)
RETURN
IF(NOT(ISBLANK(__MCostK )),__MCostK ,"-")

 

Facing this issue 

nehamaru1985_0-1726116306312.png

Kindly help me to resolve this issue 

1 ACCEPTED SOLUTION
AsNa_92
Resolver II
Resolver II

Hi,

 

you can just simply change the formating of the new measure as below:

1-create new measure: 

New Measure = CALCULATE(SUM(TableName[ColumnName])) + 0
 
2- change the formatting of the new measure

#,0.00;(#,0.00);"-"

 

AsNa_92_0-1726117387806.png

 

View solution in original post

4 REPLIES 4
AsNa_92
Resolver II
Resolver II

Hi,

 

you can just simply change the formating of the new measure as below:

1-create new measure: 

New Measure = CALCULATE(SUM(TableName[ColumnName])) + 0
 
2- change the formatting of the new measure

#,0.00;(#,0.00);"-"

 

AsNa_92_0-1726117387806.png

 

Thank you @AsNa_92 Its working 

rajendraongole1
Super User
Super User

Hi @nehamaru1985 -Can you modify the formulae as below:

 

__M Cost K$ =
VAR __MCostK = DIVIDE(CALCULATE(SUM('Drivers'[Allocation]), 'Drivers'[Measurement] = "PH"), 1000)
RETURN
IF(
NOT(ISBLANK(__MCostK)),
FORMAT(__MCostK, "0.00"), -- Formats the number as a string
"-"
)

 

Let me know if this works for you!





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

Proud to be a Super User!





HI @rajendraongole1 

Still facing same issue , Kidnly help

 

__MnS K$ =
var _MnSK = DIVIDE(CALCULATE(sum('Fact'[Allocation]), 'Fact'[Measurement] = "PH"), 1000)
RETURN
IF(NOT(ISBLANK(_MnSK)),FORMAT(_MnSK,"0.000"),"-")

 

nehamaru1985_0-1726117908505.png

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.