Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
Create a list in Power Query it's easy {[col1], [col2], [col3])
But how do you create a list when you have a variable number of columns ?
In my case, my headers' name are simple, it's [1], [2], [3], ..... But I don't know if I will have 5 columns or 50.
In that case, how to you convert the values of these columns into a List ?
Solved! Go to Solution.
You may change it as follows.
Record.ToList(Record.RemoveFields(_, {"Column1", "Column2"}))
You may simply add a custom column.
Record.ToList(_)
Ok Thanks Sam,
But if want all the columns except the first column or, like in my case, exclude the first 4 columns from your List. In that case, what do you do ?
You may change it as follows.
Record.ToList(Record.RemoveFields(_, {"Column1", "Column2"}))
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
67 | |
51 | |
38 | |
26 |
User | Count |
---|---|
88 | |
52 | |
45 | |
39 | |
38 |