Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
amolkulkarnigk1
Regular Visitor

Unpivot table w

I have a table as below

 

Wrong Rate

Sr. No  Name  Appl. No  PolicyRate 

1          Abc     1234         10

2          zxc      1224         11

Need one additional column which shows values from 1st header i. e as "Wrong Rate" In each row of table

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @amolkulkarnigk1 ,

Based on the description, I'm assuming your table looks like this:

vcgaomsft_0-1703493628245.png

You can get the value of Wrong Rate by adding a custom column(After the twice Promoted Headers):

vcgaomsft_1-1703493845978.png

Advanced editor.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtAzMlLSUYKiWJ1opeAiPQW/fCDPLzE3FUg5FhTkQEUC8nMykyuDEktSwSoNQbJJyUDS0MjYBEQZgMVBBlZVQMSNwOKGSrGxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t, Column4 = _t]),
    #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
    #"Promoted Headers1" = Table.PromoteHeaders(#"Promoted Headers", [PromoteAllScalars=true]),
    #"Added Custom" = Table.AddColumn(#"Promoted Headers1", "Wrong Rate", each Source[Column1]{0})
in
    #"Added Custom"

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @amolkulkarnigk1 ,

Based on the description, I'm assuming your table looks like this:

vcgaomsft_0-1703493628245.png

You can get the value of Wrong Rate by adding a custom column(After the twice Promoted Headers):

vcgaomsft_1-1703493845978.png

Advanced editor.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtAzMlLSUYKiWJ1opeAiPQW/fCDPLzE3FUg5FhTkQEUC8nMykyuDEktSwSoNQbJJyUDS0MjYBEQZgMVBBlZVQMSNwOKGSrGxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t, Column4 = _t]),
    #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
    #"Promoted Headers1" = Table.PromoteHeaders(#"Promoted Headers", [PromoteAllScalars=true]),
    #"Added Custom" = Table.AddColumn(#"Promoted Headers1", "Wrong Rate", each Source[Column1]{0})
in
    #"Added Custom"

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

PijushRoy
Super User
Super User

Hi @amolkulkarnigk1 

I am not clear with your requirement, if the below solution is not working, please share more details and a screenshot of the requirement.


Try this, Create a Custom Column in Power Query
Give column name
In formula box, type

="Wrong Rate"

It will create a new column with the Wrong Rate text

 
If solved your requirement, please mark this answer as SOLUTION.
If this comment helps you, appreciate your KUDOS

Thanks 
Pijush




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors