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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
jthajek
New Member

Concat 2 columns for every row of a report in a dynamic textbox?

Good Morning,

 

I am relatively new to PowerBI and still learning so this may be a simple answer that I just haven't been able to piece together from the information that's out there.

 

I have a report that has a Measure to average values from a database (Column2) that share a common Description (Column1).

 

This gives me a report with a number of rows based on the unique Descriptions in the database.

 

I would like to have a text box that concatenates the Text in Column1 and the value in Column2 on its own line for every row in the report.

 

I've tried to reference the values in a text box, but it only returns the most recent value in the whole database, not the report, and it only gives me one line, not a line for every row.

 

PowerBI seems like a powerful program, and I'm excited to learn more about it, so any help would be greatly appreciated!

1 ACCEPTED SOLUTION

@jthajek 

To obtain a sorted list 

Concat =
CONCATENATEX (
VALUES ( 'Table'[Description] ),
'Table'[Description] & " - " & ROUND ( [Measure], 0 ),
UNICHAR ( 10 ),
'Table'[Description], ASC
)

View solution in original post

4 REPLIES 4
tamerj1
Super User
Super User

Hi @jthajek 
Please try

Concat =
CONCATENATEX (
    VALUES ( 'Table'[Description] ),
    'Table'[Description] & " - " & [Measure],
    UNICHAR ( 10 )
)

Thank you for your swift reply, it's giving an error "Cannot find table 'Table'."

Do I need to reference my report in a table or does it somehow do that automatically?

 

So I realized I needed to pass the datatable as the "Table", now I get an unsorted list with the values! 

Is there a way to sort the list and limit the number of decimal places?

 

Thank you so much for your help!

 

I figured out that using a Round function fixed the decimal places issue.

@jthajek 

To obtain a sorted list 

Concat =
CONCATENATEX (
VALUES ( 'Table'[Description] ),
'Table'[Description] & " - " & ROUND ( [Measure], 0 ),
UNICHAR ( 10 ),
'Table'[Description], ASC
)

You're amazing! Thank you so much for your help, that worked perfectly!

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.