Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I have a similar dataset as below (row 0 is the headers here):
Column1 | Column2 | Column3 | Column4 |
Date | Column1 | Column2 | Column3 |
20180320 | ReportName | Gross | Profit |
20180319 | EvidenceA | 5 | 3 |
20180318 | EvidenceB | 10 | 8 |
20180317 | EvidenceC | 15 | 13 |
After extracting data out of a multiple excel files, I'm at the point in query where I'm ready to promote headers but as you can see, it's not clean. I either want to:
1. Shift column 1 down one, remove the 1st row and promote the new 1st row to headers
2. Shift all the other columns (except column 1) up 1 and then promote the 1st row to headers
Is there a way to shift up/down for only 1 column? I've read an example of using index+nested joins but I got lost and it didn't make sense.
Solved! Go to Solution.
I know of one way.. I do not know if it is ideal
Please check the attached file here
Here is the process
1) Create a duplicate Query
2) Remove the first column in original Query
3) Remove the other 3 Columns in Duplicate Query
4) Promote the relevant rows as headers in both Queries
5) Add an Index Column in both Queries
6) Now merge both queries using full outer join
I know of one way.. I do not know if it is ideal
Please check the attached file here
Here is the process
1) Create a duplicate Query
2) Remove the first column in original Query
3) Remove the other 3 Columns in Duplicate Query
4) Promote the relevant rows as headers in both Queries
5) Add an Index Column in both Queries
6) Now merge both queries using full outer join
This solution is manual but what we should do to dynamically shift 1 column down or up?
@Anonymous
There's a way to do in Power Query, assuming there is something that will trigger when the data starts vs. any other rows that should be removed.
Basically would write function that would look for this "anchor" and remove the rows above it. It would be flexible enough to not always assume it would only 1 row.
If you start a new post, and add some sample files I can probably put a solution together. If you do make a new post ( I wouldnt clog up this post) please be sure to tag me.
-Nick
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
75 | |
60 | |
37 | |
33 |
User | Count |
---|---|
102 | |
56 | |
52 | |
46 | |
40 |