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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
JJohnson4
Frequent Visitor

Split field by delimiter and display as a list

Hi,

 

I have included a very basic example of the data below. Basically I have a table of unique IDs and one of the columns contains a bunch of text, seperated by a semicolon. I simply want to create a visual, something like "Card (new)" that displays the 'List of Values' but with each item on a new line.

 

IDList of Values
111Item1; Item2; Item3
222Item1; 
333 
444Item1; item2

 

I have tried:
(Calculated Column)

SplitValues =
VAR CurrentID = TableName[ID]
VAR ValuesList = LOOKUPVALUE(TableName[List of Values], ATT7[ID], CurrentID)
RETURN SUBSTITUTE(ValuesList, ";", UNICHAR(10))
 
(Measure)

FormattedList =
VAR CurrentID = SELECTEDVALUE(TableName[ID])
VAR ValuesList = LOOKUPVALUE(TableName[List of Values], TableName[ID], CurrentID)
VAR SplitValues = SUBSTITUTE(ValuesList, ";", UNICHAR(10))
RETURN SplitValues
 
(HTML Measure)

FormattedList =
VAR CurrentID = SELECTEDVALUE(TableName[ID])
VAR ValuesList = LOOKUPVALUE(TableName[List of Values], TableName[ID], CurrentID)
VAR SplitValues = SUBSTITUTE(ValuesList, ";", "
")
RETURN SplitValues
 
None of those work, the visual just inserts a space instead of a new line and everything is still displayed on one line.
 
Any help would be appreciated 🙂

1 ACCEPTED SOLUTION
v-ssriganesh
Community Support
Community Support

Hi @JJohnson4,
Thank you for reaching out to the Microsoft Fabric Forum Community.

I have reproduced your example in Power BI and achieved the expected output where each item in the "List of Values" appears on a new line, as requested.

Output:

vssriganesh_0-1747282665478.png

 

I used a Table visual (instead of a Card) because Card visuals do not support line breaks like UNICHAR(10), whereas Table visuals do with word wrap enabled.

For your reference, I’ve attached the .pbix file demonstrating the working solution.


If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.

View solution in original post

13 REPLIES 13
v-ssriganesh
Community Support
Community Support

Hi @JJohnson4,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.

v-ssriganesh
Community Support
Community Support

Hi @JJohnson4,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

 

v-ssriganesh
Community Support
Community Support

Hi @JJohnson4,
Thank you for reaching out to the Microsoft Fabric Forum Community.

I have reproduced your example in Power BI and achieved the expected output where each item in the "List of Values" appears on a new line, as requested.

Output:

vssriganesh_0-1747282665478.png

 

I used a Table visual (instead of a Card) because Card visuals do not support line breaks like UNICHAR(10), whereas Table visuals do with word wrap enabled.

For your reference, I’ve attached the .pbix file demonstrating the working solution.


If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.

Hi @JJohnson4,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please accept it as a solution and give it a 'Kudos' so other community members with similar problems can find a solution faster.
Thank you.

techies
Super User
Super User

Hi @JJohnson4 is this the output you need?

 

techies_0-1747225824284.png

 

― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

Hi @techies ,

how did you achieve it?

Hi @powerbiexpert22 using this calculated column in the itemstable

 

Formatted Values =
VAR Val = [List of Values]
RETURN
SUBSTITUTE(
    IF(RIGHT(Val, 1) = ";", LEFT(Val, LEN(Val) - 1), Val),
    ";",
    UNICHAR(10)
)
― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

Hi @techies ,

above forumula is giving me output in single row instead of multiple rows for same ID as shown below

 

powerbiexpert22_0-1747284023827.png

 

ya correct, now use it in the table visual @powerbiexpert22 

― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

Hi @techies ,

i can see below , how it is showing items in different rows for same ID considering the fact that we have only one row per ID in our dataet?

Hi @powerbiexpert22 please review the pbix file shared by community member @v-ssriganesh , my approach is also the same 🙂

― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978
JJohnson4
Frequent Visitor

Aaaaand just as I post this, I found a workaround of sorts. I used a text box and used conditional formatting for the Title and used the following calculated column:

 

SplitValues =
VAR CurrentID = TableName[ID]
VAR ValuesList = LOOKUPVALUE(TableName[List of Values], ATT7[ID], CurrentID)
RETURN SUBSTITUTE(ValuesList, ";", UNICHAR(10))

ok

― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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