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
johnyip
Solution Sage
Solution Sage

Need help in formatting thousand separator and decimal points using FORMAT()

Hello all,

 

I tried to use a DAX like FORMAT([a measure],"#,###.####") to control the display of a measure value as having a thousand separator and 4 decimal places.

 

This DAX is working fine except when the measure is actually an integer, an unnecessary trailing dot appears, as the follow picture.

 

johnyip_0-1689662015167.png

 

I would be grateful if anyone can provide a DAX expression that can elminiate that trailing dot but retaining the setting of 4 decimal places and thousand separator. Thanks.

 



Please mark my post as the solution if this answers your question!
Appreciate your Kudos !!
1 ACCEPTED SOLUTION
johnyip
Solution Sage
Solution Sage

I just found a twisted way to achieve this:

 

IF(INT([measure])=[measure)],FORMAT([measure],"#,##0"),FORMAT([measure],"#,##0.####"))
 
But I am really not sure if this is the best way to do that,as this seems stupid. Please tell me if there is a smarter way.





Please mark my post as the solution if this answers your question!
Appreciate your Kudos !!

View solution in original post

2 REPLIES 2
johnyip
Solution Sage
Solution Sage

I see there are no further replies, and I assume my twisted way is the only way to achieve my desired outcome under the current version og PowerBI.



Please mark my post as the solution if this answers your question!
Appreciate your Kudos !!
johnyip
Solution Sage
Solution Sage

I just found a twisted way to achieve this:

 

IF(INT([measure])=[measure)],FORMAT([measure],"#,##0"),FORMAT([measure],"#,##0.####"))
 
But I am really not sure if this is the best way to do that,as this seems stupid. Please tell me if there is a smarter way.





Please mark my post as the solution if this answers your question!
Appreciate your Kudos !!

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.