Forum Discussion
nehamaru1985
2 years agoNew 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]), '...
- 2 years ago
Hi,
you can just simply change the formating of the new measure as below:
1-create new measure:
New Measure = CALCULATE(SUM(TableName[ColumnName])) + 02- change the formatting of the new measure#,0.00;(#,0.00);"-"
rajendraongole1
Super User
2 years agoHi 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!
- nehamaru19852 years agoNew Member
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"),"-")