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
Anonymous
Not applicable

Extract column information from rows within a table

Hi,

I would like to extract the individual rows which are from 1-11 (and they keep on repeating) into 11 columns with their respective values.

2020-04-09 12_46_07-New Message - Microsoft Power BI Community.png

 

 

Thanks,

Modasher.

1 ACCEPTED SOLUTION
v-gizhi-msft
Community Support
Community Support

Hi,

 

Please try to add an index column first.

Then try to create this calculated column:

Group = ROUNDUP('Table'[Index]/11,0)

Choose matrix visual, it shows:

51.PNG

Here is my test pbix file:

pbix 

Hope this helps.

 

Best Regards,

Giotto

View solution in original post

3 REPLIES 3
v-gizhi-msft
Community Support
Community Support

Hi,

 

Please try to add an index column first.

Then try to create this calculated column:

Group = ROUNDUP('Table'[Index]/11,0)

Choose matrix visual, it shows:

51.PNG

Here is my test pbix file:

pbix 

Hope this helps.

 

Best Regards,

Giotto

amitchandak
Super User
Super User

Vera_33
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

Do you mean you want to pivot the every 11 rows to a table with 11 columns? Use Power Query to pivot it.

 

#1 add a custom column - Table.AddColumn(your last step, "Custom", each Number.IntegerDivide([Column Index]-1,11))

#2 remove the index column - Table.SelectColumns(#"Added Custom",{"Custom", "display_name","value"})

#3 pivot the table - Table.Pivot(#"Removed Other Columns", List.Distinct(#"Removed Other Columns"[display_name]), "display_name", "value")

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.