Showing results for 
Search instead for 
Did you mean: 
Not applicable

DAX function for converting a number into a string?

I have a string (url) and a number (pagination), I need to concatenate them into a resulting URL. 


I have search and looked at the VALUE and FORMAT dax functions but can't make it work in converting a number into a string. e.g.


"" & [page] 

returns an error  "We cannot apply operator & to text and number. 


Any clues how I can convert [page] to a string?


Not applicable

Thanks, ended up using Text.From( [Counter] )

View solution in original post

Not applicable

Yes, this is easy to pull off in Power Query.  If you need to do this in the model (for instance, off of a calculated table), the correct DAX would be to use FIXED(<number>,3,1) to convert the number into string at 3 decimals and then RIGHT(<>,3) to retun the right 3 decimals. 




You can also do the concatenation by “Merge Columns” in Query Editor. Select these two columns and click “Merge Columns”.

DAX function for converting a number into a string_1.jpg


Best Regards,


= "Text" & Number.ToText(Number)

Wow, That's pretty easy. 


Community Champion
Community Champion



try using 

"" & Format([page] ,"####")


If this works please accept as a solution and also give Kudos. If it does not work let me know what happened.






Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

This should be the solution, because the request was to use DAX, not Power Query M.

Not applicable

Thanks, ended up using Text.From( [Counter] )

Format() is the correct answer. What you've used is not DAX

Not applicable

HOw to you use this FORMAT() function in example?

lets say if you have two columns where you are appling into  a meaure 


newmeasure = viewname[columnnameingar] and  viewname[newcolumnstring] , "a stringvalue"

Not sure I'm fully understanding you @Anonymous


General info page on FORMAT:


Couple examples from:

FORMAT( 12345.67, "General Number")

FORMAT( 12345.67, "Currency")


FORMAT( 12345.67, "Percent")


Combining column values in a measure usually won't work due to context. Unless you first aggregate the columns in some way. Measures yield a single value given a context, so if your context includes multiple rows, then any measure that combines column values without aggregation will error out. 


Hope that helps. 


Helpful resources

June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors