Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Dear all,
I have the following set of data:
I used the following formula to get:
ColToMove = HeadersToShift,
MovedCol = List.Repeat({null},2)&ColToMove
I tried to make this change dynamic based on the values I get in the Column Rows To ShiftDown
ColToMove = HeadersToShift,
MovedCol = List.Repeat({null},Rows_To_ShiftDown)&ColToMove
But I got this error:
Expression.Error: We cannot convert a value of type Table to type Number.
Could you help?
Thanks.
Solved! Go to Solution.
because Rows_To_ShiftDown is a table, not a single number — but List.Repeat expects a number as its second argument (how many times to repeat).
maybe you can use the following formula instead
ShiftCount = Rows_To_ShiftDown{0}[YourColumnName],
MovedCol = List.Repeat({null}, ShiftCount) & ColToMove
Hi @Mic1979 ,
we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.
Regards,
Chaithanya
Hello @v-kathullac
sorry for the delay, I just had the opportunity to test the solution.
Accepted, many thanks for your great support.
because Rows_To_ShiftDown is a table, not a single number — but List.Repeat expects a number as its second argument (how many times to repeat).
maybe you can use the following formula instead
ShiftCount = Rows_To_ShiftDown{0}[YourColumnName],
MovedCol = List.Repeat({null}, ShiftCount) & ColToMove
Hello
How to start this repetition from the second element of the column and not from the first?
Thanks.
I did not get your answer.
I knew the reason, but I would like to understand how to fix the issue.
I am not so familiar with PQ unfortunately. 🙂
Thanks a lot.
To just answer your question: the error is because Rows_To_ShiftDown is a table, not a number.
Perhaps you could complete your question to get better suggestions.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 4 |