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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
NagaPushpa
New Member

Truncating the multiline text in a table visual column in power BI report

I have requirement to generate a power BI report which is having live data connection as source. I have added a table visual in my report, which has multiple columns. One of these columns is 'Next Steps'. This column is a multiline text column which has many lines of data. Because of which the row height in the table visual is very large and so the UI is getting disturbed. As I am using live data connection, I am unable to make use of calculated columns. So using below DAX formula, I tried to truncate the lines of data to max of 100 characters and then rest of the data is showing as ellipses. 
But I want to display the rest of the truncated text when hovered or clicked on the ellipses. Can anyone suggest a better way to do this. Only way for me is to use DAX as of now.

 DAX used:
Ellipsed Next steps =
VAR FullText = SELECTEDVALUE(Employee[Next Steps])
VAR MaxChars = 100
RETURN
    IF(
        LEN(FullText) > MaxChars,
        LEFT(FullText, MaxChars) & "...",  -- Truncate the text
        FullText
    )

Sample example:
Emp IDEmp NameEmployee locationNext StepsAssigned to
12345ThanmayeeHyderabadLong text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Manager 1
23456SatvikChennaiLong text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Manager 2
34567MokshaBangloreLong text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Manager 3
45678JagruthiBangloreLong text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Manager 4
56789MohanDelhiLong text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Manager 5
67890SamyukthaHyderabadLong text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Manager 6
2 REPLIES 2
vicky_
Super User
Super User

I think you'd need to create two measures in this case - one for the normal text and one for the truncated. You would use the normal one in a new tooltip page, and then the truncated one would be in your main table.

Thanks for the response.

 

I created 2 separate measure as below.
FullNextSteps = SELECTEDVALUE(Employee[Next Steps])

Ellipsed Next steps =
VAR FullText = SELECTEDVALUE(Employee[Next Steps])
VAR MaxChars = 100
RETURN
IF( LEN(FullText) > MaxChars,
LEFT(FullText, MaxChars) & "...", -- Truncate the text
FullText )
I used the second measure in table visual as a column to display the truncated text. I created a separate custom tooltip page and added first measure to it. Now I am using this tooltip in table visual page. But this tooltip is showing up on all columns. I want to display this tooltip only when hovered on specific column.
Please suggest how can this be done?
NagaPushpa_1-1714635250163.png

 

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.