cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

CREATE COLUMN THAT REFERENCES SPECIFIC CELL

I have imported a crazy excel file into PBI which I need to model. Column 1 Row 1 holds a date, the headers are all on Row 2.

So I want to create a [Date] column which points to Column 1 Row 1 and then I can promote headers. 

 

How do I do this?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I figured it out.

1. Insert a step (Custom1) to pull your date

= Record.Field(ChangedType{0},"Column1")

2. Inset a step (Custom2) to return your table by pointing to the step before Custom1

= ChangedType

 3. Add a Custom Column which simply points to Custom1

= Table.AddColumn(Custom2, "Date", each Custom1)

  

View solution in original post

3 REPLIES 3
johnt75
Super User
Super User
amitchandak
Super User
Super User

@Anonymous , Take rows 1 and column into a different table. Delete everything. In another table keep everything other than date 1 and column. In both tables add a column with the same value and merge these two tables using that



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!
Anonymous
Not applicable

I figured it out.

1. Insert a step (Custom1) to pull your date

= Record.Field(ChangedType{0},"Column1")

2. Inset a step (Custom2) to return your table by pointing to the step before Custom1

= ChangedType

 3. Add a Custom Column which simply points to Custom1

= Table.AddColumn(Custom2, "Date", each Custom1)

  

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors