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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
delithyotho
Frequent Visitor

How to place a comma from an existing card formatted to text

Thanks to @amitchandak for fixing my measure below, it works perfectly. nNow, the next task is I would like to have a comma separator whenver it says for example $1000.0M, and convert it to $1,000.0M. 

 

Here's the measure:

Card graph =
Var Total1 = CALCULATE(SUM('MasterData'[Sum1])*1000000)
Var Total2 = CALCULATE(SUM('MasterData'[Sum2])*1000000)
Var decimal = "0.0"
RETURN
SWITCH ( TRUE() ,
Total2 >= 1000000000 , CONCATENATE("$", FORMAT (Total1/1000000000, decimal & "bn")) ,
Total2 < 1000000000, CONCATENATE("$", FORMAT (COALESCE(Total1, 0)/1000000, decimal & "M")) ,
CONCATENATE("$", FORMAT (COALESCE(Total1, 0) , decimal)
))
 
This measure will convert it to text so I'm unable to use the Callout Value functions in the Card Graph.
 
Thanks in advance!
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@delithyotho , try like

 

Card graph =
Var Total1 = CALCULATE(SUM('MasterData'[Sum1])*1000000)
Var Total2 = CALCULATE(SUM('MasterData'[Sum2])*1000000)
Var decimal = "0.0"
RETURN
SWITCH ( TRUE() ,
Total2 >= 1000000000 , CONCATENATE("$", FORMAT (Total1/1000000000, "#,###.0") & "bn") ,
Total2 < 1000000000, CONCATENATE("$", FORMAT (COALESCE(Total1, 0)/1000000, "#,###.0" )& "M") ,
CONCATENATE("$", FORMAT (COALESCE(Total1, 0) , "#,###.0")
))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@delithyotho , try like

 

Card graph =
Var Total1 = CALCULATE(SUM('MasterData'[Sum1])*1000000)
Var Total2 = CALCULATE(SUM('MasterData'[Sum2])*1000000)
Var decimal = "0.0"
RETURN
SWITCH ( TRUE() ,
Total2 >= 1000000000 , CONCATENATE("$", FORMAT (Total1/1000000000, "#,###.0") & "bn") ,
Total2 < 1000000000, CONCATENATE("$", FORMAT (COALESCE(Total1, 0)/1000000, "#,###.0" )& "M") ,
CONCATENATE("$", FORMAT (COALESCE(Total1, 0) , "#,###.0")
))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.