Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
hi there,
I would like the number format in %, however, when I used formula ratio% = IFERROR(SUM(Sheet1[sales])/SUM(Sheet1[cost]),"na"), the result cannot be formatted in %, how to solve this? thanks
data model is as below
Best regards,
ER
Solved! Go to Solution.
Hi @erihsehc
This could possibly done by using the Format as shown below.
My Measure =
IF (
[Net Win] > 100,
"nm",
FORMAT ( DIVIDE ( SUM('Table1'[sales]), SUM('Table1'[Other Sales]), "NA" ), "Percent" )
)
Hi @erihsehc
What I would suggest doing is to use the new Divide Function which caters for Divide by Errors.
So your measure could be written as:
My Measure = DIVIDE(SUM(Sheet1[sales]),SUM(Sheet1[cost]))
This will result in the Divide by errors being blank
thanks @GilbertQ, got it. However, we would like to show "na" (also exclude some extreme number by using if(>100,"nm") ) instead of blank for presentation. is that any method to show text but also format the number as %?
Hi @erihsehc
This could possibly done by using the Format as shown below.
My Measure =
IF (
[Net Win] > 100,
"nm",
FORMAT ( DIVIDE ( SUM('Table1'[sales]), SUM('Table1'[Other Sales]), "NA" ), "Percent" )
)
thanks @GilbertQ, this formula is working but there is another issue that, when I put this measure to a multi-row card, I can not format this %result, ("-1.28%" on the screenshot used this measure), I can not add label for it, and this % always stay on top, can not format the color and size.
ok thanks for the help![]()
Hi @erihsehc
Unfortunately there currently is no other way to format the measures so that they can change based on different scenario's.
I would suggest going to https://ideas.powerbi.com and voting for the idea.
Could you consider a 2nd Formatting Measure for your cards? Something like
Formatted = Var MeasureResult = [YourMeasure]
RETURN
IF(
MeasureResult = "na",
"NA",
(MeasureResult * 100) & "%"
)
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 16 | |
| 10 | |
| 10 | |
| 8 | |
| 7 |
| User | Count |
|---|---|
| 40 | |
| 36 | |
| 34 | |
| 28 | |
| 20 |