Forum Discussion
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!!
Hi,
use the following M-Code:
Date.ToText([Date]) & "-" & Number.ToText([Sales],"#,##0.00"))
Regards FrankAT
4 Replies
- VasTgMemorable Member
Anonymous
Why do want to achieve that in M query instead in the model section?
If it helps, mark it as a solution
Kudos are nice too
- mwegenerMost 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. - FrankATCommunity Champion
Hi,
use the following M-Code:
Date.ToText([Date]) & "-" & Number.ToText([Sales],"#,##0.00"))
Regards FrankAT
- AnonymousNot applicable
perfect thank you much