Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
A have a use case, where I need to concatenate three columns from the same table. I also need to format one of the columns in the process.
I am wondering whether the best option is to use DAX or Power Query.
I have three columns like this:
Name (text) | Win % (whole number) | Sales price (fixed decimal number) |
Blah blah 1 | 50 | 514594105,00 |
Which I would like to end up like this, where the Sales price gets formatted as millions in the process.
Blah blah 1 (50% / M514)
I have tried various approached but haven't really found a solution.
I hope you can help.
Solved! Go to Solution.
Hello @Nielf ,
try this
Newcolumn = Name & " " & "(" & win% & ")" & " " & Price
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Proud to be a Super User! | |
Thanks. Both of the solutions work as expected.
Power Query offers more capabilities to transform data in various way, like to change the format of the Sales Price column you can use the Power Query's Number.ToText() function.
Here's an example of how to use Power Query to format the Sales Price column to show values in millions:
The above code will format the Sales Price column as millions and it uses Table.TransformColumns() to change the column type to text using Number.ToText() function.
Then, you can use DAX to create a calculated column by concatenating the columns with the correct separators and formatting the values like the next example
If the use case is simple and you just need to concatenate the column and format one of them, the above code should be more than enough, but if you have more complex use cases, Power Query will be better suited to handle them.
Keep in mind that the above code is just an example, you'll need to adjust the code to match the column and table names of your dataset.
Hello @Nielf ,
try this
Newcolumn = Name & " " & "(" & win% & ")" & " " & Price
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Proud to be a Super User! | |
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
70 | |
55 | |
38 | |
31 |
User | Count |
---|---|
75 | |
64 | |
64 | |
49 | |
45 |