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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
NickTT
Helper III
Helper III

Moving Data Back to List

I have data in the following Format:

Form NumberState
0001New York
0001Delaware
0001Maryland
0002

New York

0002

Delaware

0003

Maryland

 

I would like to return it in a report for easier viewing to a single line likes this using the Metrix or Table Visualization.

FormState
0001Deleware, Maryland, New York
0002Delaware, New York
0003Maryland

 

This data is coming from a SharePoint List where State is managed by a Managed TermSet. This is also a gross simplification of the data. I have multiple lookup colums like this is my dataset. Expanding each column is created extra rows of data to work with makes the model larger than it really needs to be. So I am trying to flatten the dataset as much as possible.

 

Extract Values from List step would be perfect here but unfortunately the values are then stored as a Record and need to be extracted again. So instead you get the following Error:

 

 

 

Expression.Error: We cannot convert a value of type Record to type Text.
Details:
    Value=
        Label=Maryland
        TermGuid=d6b08820-07d2-412e-8eac-f3058cb6068d
        WssId=1
    Type=[Type]

 

 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@NickTT - In DAX, you could put Form Number in a table visual and then this measure in the table visual as well.

 

Measure = CONCATENATEX(DISTINCT('Table'[State]),[State],",")

 

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

@NickTT - In DAX, you could put Form Number in a table visual and then this measure in the table visual as well.

 

Measure = CONCATENATEX(DISTINCT('Table'[State]),[State],",")

 

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

This DAX Measure almost does what I want but I still get Multiple entries for some data or no results for other. Trying to figure out why.

Issue was Filter Direction. Had to change it to "Both". Very cleaver and clean solution there!

FrankAT
Community Champion
Community Champion

Hi @NickTT 

you can do it in Power Query like this:

 

 

// Table
let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjAwMFTSUfJLLVeIzC/KVorVgYu5pOYklicWpSKL+SYWVeYk5qXAxIyw6DXCotcYRW8sAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Form Number" = _t, State = _t]),
    #"Grouped Rows" = Table.Group(Source, {"Form Number"}, {{"Count", each _, type table [Form Number=nullable text, State=nullable text]}}),
    #"Added Custom1" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.RemoveColumns([Count],"Form Number")),
    #"Added Custom" = Table.AddColumn(#"Added Custom1", "State", each Table.ToList([Custom])),
    #"Removed Columns1" = Table.RemoveColumns(#"Added Custom",{"Count", "Custom"}),
    #"Extracted Values" = Table.TransformColumns(#"Removed Columns1", {"State", each Text.Combine(List.Transform(_, Text.From), ","), type text})
in
    #"Extracted Values"

 

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors