最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

powerbi - For loop from column to table - Stack Overflow

programmeradmin2浏览0评论

How do you loop through a column of data to create a table with. The number of columns will be constant based on the first x number of rows but the number number of entries will vary based on the number of personnel records. The database pull gives all the data in a single column, but it needs to be formatted to a table.

Default format

General Data
Name
Age
City
Bob
31
Paris
John
24
Washington
Jill
45
Vancouver

How do you loop through a column of data to create a table with. The number of columns will be constant based on the first x number of rows but the number number of entries will vary based on the number of personnel records. The database pull gives all the data in a single column, but it needs to be formatted to a table.

Default format

General Data
Name
Age
City
Bob
31
Paris
John
24
Washington
Jill
45
Vancouver

The first X number of rows would be the table headers, and the following series of rows would be the data in each column.

Desired Format

Name Age City
Bob 31 Paris
John 24 Washington
Jill 45 Vancouver
Share Improve this question edited Mar 11 at 13:19 DarkBee 15.5k8 gold badges72 silver badges118 bronze badges asked Mar 11 at 13:14 rjuzzlerjuzzle 91 silver badge5 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

you can try this in PQ

create two index columns and modulo one column

select index column and pivot columns

modulo index 1column

select three columns and fill down

at last filter index 1 = 2

发布评论

评论列表(0)

  1. 暂无评论