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
TiffanyCui
Helper I
Helper I

Transpose Help

Hi everyone,

 

I need help with one transpose. For example, when I create the tables, all the columns are in tabular format,

but I want to transpose one specific column into a row, which means one "sequence" number, below is the note about that "Sequence" but transposed, so as all the rest of the "Sequence" numbers.

Inked1_LI.jpg

Thank you for your patience and time and hope to hear back from you soon.

 

Thank you,

Tiffany

9 REPLIES 9
TiffanyCui
Helper I
Helper I

Hi everyone,

 

I need help with one transpose. For example, when I create the tables, all the columns are in tabular format,

but I want to transpose one specific column into a row, which means one "sequence" number, below is the note about that "Sequence" but transposed, so as all the rest of the "Sequence" numbers.

Inked1_LI.jpg

Thank you for your patience and time and hope to hear back from you soon.

 

Thank you,

Tiffany

Hi Pat,

For example, this is the input of the table

Inked2_LI.jpg

 

The desired output is to transpose "Work Instructions Notes",for example, "cosmetic" to a row right below its sequence number "110", and whatever in the notes will be below "Op code" "Op name" and "work center". Work Instructions Notes will be a separate row for this specific Sequence.

So there will be a big amount of sequence numbers with Work Instructions Notes and each work instruction will be right below that sequence number. Also, I need to print out the full PDF report about all the data. As we know, online service PDF is not able to print out all the columns and rows. I'm thinking about how to make this happen through Paginated Reports using Report Builder.

 

Thank you for your patience, Pat.

 

Thank you for the additional information.  Rather than re-structure your data, you should be able to accomplish that just on the report side (Power BI or Paginated Reports).  For example, you could add an expression that concatenates those two fields along with a carriage return.  Or you could nest report elements under a group.

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Can you provide some sample/mock data of input and desired output?  Also, what do you plan to do with data structured that way?  Perhaps there is an alternate approach we can propose.

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


TiffanyCui
Helper I
Helper I

Hi everyone,

 

I need help with one transpose. For example, when I create the tables, all the columns are in tabular format,

but I want to transpose one specific column into a row, which means one "sequence" number, below is the note about that "Sequence" but transposed, so as all the rest of the "Sequence" numbers.

Inked1_LI.jpg

Thank you for your patience and time and hope to hear back from you soon.

 

Thank you,

Tiffany

A few unclear requirements. Kindly share the sample data and desired output.

 

What are the criteria for converting Note into a column, will Note be repeating/transposing against each row of your data?







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




TiffanyCui
Helper I
Helper I

Hi everyone,

 

I need help with one transpose. For example, when I create the tables, all the columns are in tabular format,

but I want to transpose one specific column into a row, which means one "sequence" number, below is the note about that "Sequence" but transposed, so as all the rest of the "Sequence" numbers.

Inked1_LI.jpg

Thank you for your patience and time and hope to hear back from you soon.

 

Thank you,

Tiffany

wdx223_Daniel
Super User
Super User

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("PU+5EQQhDOuFWAE2r2vZ2f7bOMkcG6BBD8Z6nmIFZQliEWwTfKeGWLANshdPcWqf6XqwU6IPN5Ao1SS1a07FvKfGBKaBTLl+3dARrCMhEIF1UoOSjimwFW+CAQtsA4lS82tQCV0f2/w3qOgOMuXUb+qXHrfHyC07eqjGOB3SUIfQrWloeGqIjVYRJ5dL5Xq13p6jpghKrApSJa1ey/xOa5EazDkPZO/7Aw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Sequence = _t, Column1 = _t, Column2 = _t, Column3 = _t, Column4 = _t, Notes = _t]),
    Custom1 = Table.Combine(Table.Group(Source,"Sequence",{"n",each Table.RemoveColumns(_,"Notes")&#table({"Sequence","Column1"},{{"Notes",Text.Combine([Notes],";")}})})[n])
in
    Custom1

is this what you want?

 

amitchandak
Super User
Super User

@TiffanyCui ,

I doubt you can transpose a single column.

In power query, you can transpose the table

 

In matrix visual you can move measures/values on on row(using show on row)

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