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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Almaz722
New Member

Tranform data from Rows

Dear all hi, 

I faced with problem in data preparation for our dashboards.

I Have dataset like this.

Name Value

AX
BY
CZ
AV
BO
CB

and i need to tranform it for propper calculation like this:

ABC
XYZ
VOB

Could you please help me. 

Thanks a lot, 

Almaz

1 ACCEPTED SOLUTION
slorin
Super User
Super User

Hi

= Table.FromRows(
List.Split(YourSource[Value],3),
List.FirstN(YourSource[Name],3)
)

 

or

let
Source = YourSource,
Group = Table.Group(Source, {"Name"}, {{"Values", each [Value], type list}}),
Table = Table.FromColumns(Group[Values],Group[Name])
in
Table

Stéphane 

View solution in original post

4 REPLIES 4
slorin
Super User
Super User

Hi

= Table.FromRows(
List.Split(YourSource[Value],3),
List.FirstN(YourSource[Name],3)
)

 

or

let
Source = YourSource,
Group = Table.Group(Source, {"Name"}, {{"Values", each [Value], type list}}),
Table = Table.FromColumns(Group[Values],Group[Name])
in
Table

Stéphane 

Hi, Stepane. 

let
Source = YourSource,
Group = Table.Group(Source, {"Name"}, {{"Values", each [Value], type list}}),
Table = Table.FromColumns(Group[Values],Group[Name])
in
Table

Thank you, this option works greate on test excel file, but when i want to do same on CVS/TXT file, it is doesn't work. Also, as i see there are two options how steps in query marks. When i work with CVS/TXT steps starts #. 

If you are importing from a CSV, did you remember to promote the headers? (Use First Row as Headers)

I fix issue with CSV, Thanks Stepane!!! 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors