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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
UncleLewis
Responsive Resident
Responsive Resident

Return Formatted Number As A Value

Hi all,

How can I return a Formatted Number as a value instead of text?
I tried wrapping Format() inside Value() but that returns an error.

//Format Numbers
Formatted Result =
VAR __Amount = 'Table'[Dollar Amount]
Return
SWITCH(
TRUE(),
__Amount < 1000, FORMAT( __Amount,"$###" ),
__Amount < 1000000, FORMAT( __Amount,"$#,.0K" ),
__Amount < 1000000000, FORMAT( __Amount,"$#,,.00M" ),
__Amount < 1000000000000, FORMAT( __Amount,"$#,,,.0B" )
)

 

Thanks,

-w

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

@UncleLewis You can't with the FORMAT command. That's the purpose of Custom Format Strings but those aren't going to allow that much logic. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors