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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Adding comma in PQ

Hello,

 

I created a new column in PQ that concatnates two values: Date and Sales

 

heres the code:

 

Date.ToText([Date]) & " - "& Number.ToText([Sales])

 

the problem is the sales doesnt have a thousands separator.

 

is there a way to add a thousands separator to this code?

 

thank you!!

1 ACCEPTED SOLUTION
FrankAT
Community Champion
Community Champion

Hi,

use the following M-Code:

 

Date.ToText([Date]) & "-" & Number.ToText([Sales],"#,##0.00"))

 

Regards FrankAT

View solution in original post

4 REPLIES 4
FrankAT
Community Champion
Community Champion

Hi,

use the following M-Code:

 

Date.ToText([Date]) & "-" & Number.ToText([Sales],"#,##0.00"))

 

Regards FrankAT

Anonymous
Not applicable

perfect thank you much

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,

 

it's easier with DAX

 

Column = FORMAT('Table'[Date], "mm/dd/yyyy") & " - " & FORMAT('Table'[Sales],"0,000.00")

 

Regards,

Marcus

Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


VasTg
Memorable Member
Memorable Member

@Anonymous 

 

Why do want to achieve that in M query instead in the model section?

image.png

 

If it helps, mark it as a solution

Kudos are nice too

Connect on LinkedIn

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors