cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
qmhernandez
New Member

Adding a custum column based on an particular cell

Is there a way to add a dynamic custom column that returns the contents of a cell for the entire column? I need the conents of 'First Column' row 1 to become an entire row of duplicates without having to manually type it in as a custom column as I have done in the pictures below.

qmhernandez_1-1637694512957.png

qmhernandez_2-1637694546299.png

 

 

 

 

1 ACCEPTED SOLUTION
KNP
Super User
Super User

This should do the trick.

 

let
  Source = Table.FromRows(
    Json.Document(
      Binary.Decompress(
        Binary.FromText(
          "i45WCkotSE0sSU1RCEvMKU1VitWJVnLMyy/JSC1CEknML07NK4Ewi/MzUkvywOz81KK8gtIUKLs4I6+ktAjMKU0pSs0H64gFAA==",
          BinaryEncoding.Base64
        ),
        Compression.Deflate
      )
    ),
    let
      _t = ((type nullable text) meta [Serialized.Text = true])
    in
      type table [Column1 = _t]
  ),
  #"Added Custom" = Table.AddColumn(Source, "Custom", each Source{0}[Column1])
in
  #"Added Custom"
Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

View solution in original post

1 REPLY 1
KNP
Super User
Super User

This should do the trick.

 

let
  Source = Table.FromRows(
    Json.Document(
      Binary.Decompress(
        Binary.FromText(
          "i45WCkotSE0sSU1RCEvMKU1VitWJVnLMyy/JSC1CEknML07NK4Ewi/MzUkvywOz81KK8gtIUKLs4I6+ktAjMKU0pSs0H64gFAA==",
          BinaryEncoding.Base64
        ),
        Compression.Deflate
      )
    ),
    let
      _t = ((type nullable text) meta [Serialized.Text = true])
    in
      type table [Column1 = _t]
  ),
  #"Added Custom" = Table.AddColumn(Source, "Custom", each Source{0}[Column1])
in
  #"Added Custom"
Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!