Forum Discussion
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.
Thanks,
Modasher.
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:
Here is my test pbix file:
Hope this helps.
Best Regards,
Giotto
3 Replies
- v-gizhi-msftCommunity 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:
Here is my test pbix file:
Hope this helps.
Best Regards,
Giotto
- AnonymousNot applicable
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")
- amitchandakSuper User
Anonymous ,
Please see if this can help
https://radacad.com/pivot-and-unpivot-with-power-bi
Refer, if this code can help