Forum Discussion
Issue with Promoting Headers in Power Query (Exchange Connector)
- 1 year ago
Hey Malfi,
I've dealt with this exact issue before. The changing DateTime values definitely mess up the header promotion. Here's what worked for me:
Solution:
- Skip rows dynamically first - Use Table.Skip(YourTable, 1) or Table.Skip(YourTable, 2) before promoting headers. This bypasses the DateTime row that's causing the offset.
- Find header row programmatically - Add this step to locate your actual data headers:
= Table.Skip(Source, List.PositionOf(Table.Column(Source, "Column1"), "YourExpectedHeaderName")) - Use Table.PromoteHeaders after the skip - Once you've skipped past the DateTime rows, the promotion should work consistently.
This eliminates the DateTime dependency completely. I've been using this approach for months with daily email refreshes and haven't had issues since.
The key is identifying the consistent row position of your headers relative to the email structure, not the DateTime values.
Fixed? ✓ Mark it • Share it • Help others!
Best Regards,
Jainesh Poojara | Power BI Developer
Hey Malfi,
I've dealt with this exact issue before. The changing DateTime values definitely mess up the header promotion. Here's what worked for me:
Solution:
- Skip rows dynamically first - Use Table.Skip(YourTable, 1) or Table.Skip(YourTable, 2) before promoting headers. This bypasses the DateTime row that's causing the offset.
- Find header row programmatically - Add this step to locate your actual data headers:
= Table.Skip(Source, List.PositionOf(Table.Column(Source, "Column1"), "YourExpectedHeaderName")) - Use Table.PromoteHeaders after the skip - Once you've skipped past the DateTime rows, the promotion should work consistently.
This eliminates the DateTime dependency completely. I've been using this approach for months with daily email refreshes and haven't had issues since.
The key is identifying the consistent row position of your headers relative to the email structure, not the DateTime values.
Fixed? ✓ Mark it • Share it • Help others!
Best Regards,
Jainesh Poojara | Power BI Developer
Hey jaineshp
Thanks a lot It worked perfectly 🙂
ChielFaber Thanks a lot for your answer.
Best Malfi