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
JamesBurke
Helper III
Helper III

Formatting

Hi all , 

 

Screenshot 2024-06-06 111314.png

 

Overview Card 2 = 
VAR _Change = CALCULATE([Card 2 %])
RETURN
FORMAT(_Change, "##.## % ") & " " & IF(_Change > 0 , "▲", "▼")

 

Im wondering if anyone can help why when the percentage reaches 0. it does not include zero at the start , it makes the visual look confusing , is there some wrong with my formatting measure ?

 

Card 2 % = 
VAR __BASELINE_VALUE = [Daily Average all]
VAR __VALUE_TO_COMPARE = [Daily Average]
RETURN
	IF(
		NOT ISBLANK(__VALUE_TO_COMPARE),
		DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE)
	)

 

this is my Measure used in the previous measure for some context , it has no formatting applied to them. 

2 ACCEPTED SOLUTIONS
BIstvan
Resolver I
Resolver I

@JamesBurke  In the Overview Card 2 try the below.

Overview Card 2 =
VAR _Change = CALCULATE([Card 2 %])
RETURN
FORMAT(_Change, "Percent") & " " & IF(_Change > 0 , "▲", "▼")

View solution in original post

Anand24
Super User
Super User

@JamesBurke ,
That's the default behaviour of Format DAX function when provided exact format. Here's what you can do apart from the solution @BIstvan provided:

__Zero_Format_Test =
VAR _Change = 0.002002
Return
IF(
    _Change < 1,
    FORMAT(_Change, "0.## % "),
    FORMAT(_Change, "##.## % ")
)
& " " & IF(_Change > 0 , "▲", "▼")

Output: 

Anand24_1-1717670192772.png

 


 

View solution in original post

5 REPLIES 5
BIstvan
Resolver I
Resolver I

@JamesBurke  See below a second solution which should work.

Overview Card 2 =
VAR _Change = CALCULATE([Card 2 %])
RETURN
FORMAT(_Change*100, "0.00"&"%") & " " & IF(_Change > 0 , "▲", "▼")

Anand24
Super User
Super User

@JamesBurke ,
That's the default behaviour of Format DAX function when provided exact format. Here's what you can do apart from the solution @BIstvan provided:

__Zero_Format_Test =
VAR _Change = 0.002002
Return
IF(
    _Change < 1,
    FORMAT(_Change, "0.## % "),
    FORMAT(_Change, "##.## % ")
)
& " " & IF(_Change > 0 , "▲", "▼")

Output: 

Anand24_1-1717670192772.png

 


 

@Anand24  the perfect example why DAX is amazing.

BIstvan
Resolver I
Resolver I

@JamesBurke  In the Overview Card 2 try the below.

Overview Card 2 =
VAR _Change = CALCULATE([Card 2 %])
RETURN
FORMAT(_Change, "Percent") & " " & IF(_Change > 0 , "▲", "▼")

Hi @BIstvan , 

 

Thankyou for the quick response , this worked great 🙂 

 

Thankyou !!!

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.