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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
dlwallace
Frequent Visitor

Header / Detail lines in excel report - Need to add column in detail with value from header line

Source:

 

ProducerRalph   
     
Ind 
Type
Customer NameCoverage  ToPremium PeriodCommission
FYMICHAEL  07/01/2019$47.27
FYBAO 05/01/2019 05/01/2019($67.78)
FYBAO 05/01/2019 06/01/2019($67.78)
     
ProducerBob   
     
Ind 
Type
Customer NameCoverage  ToPremium PeriodCommission
FYFRED  07/01/2019$51.66
FYBARBARA  07/01/2019$38.62
FYWENDY  07/01/2019$189.14

 

Desired result:

 

Ind 
Type
Customer NameCoverage  ToPremium PeriodCommissionProducer
FYMICHAEL  07/01/2019$47.27Ralph
FYBAO 05/01/2019 05/01/2019($67.78)Ralph
FYBAO 05/01/2019 06/01/2019($67.78)Ralph
FYFRED  07/01/2019$51.66Bob
FYBARBARA  07/01/2019$38.62Bob
FYWENDY  07/01/2019$189.14Bob

 

Any help would be appreciated.

 

Dan

1 ACCEPTED SOLUTION
ImkeF
Community Champion
Community Champion

Hi @dlwallace  ,

the following steps should get you there:

  1.  Add a conditional column like so: image.png
  2.  Check the new column and fill down values (this will add the name of the producer into every row. The following steps will just clean up the table. 
  3.  Filter out blanks on Column 4
  4.  Promote Headers
  5.  Delete / filter out rows in column "Customer Name" with value "Customer Name"

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

2 REPLIES 2
ImkeF
Community Champion
Community Champion

Hi @dlwallace  ,

the following steps should get you there:

  1.  Add a conditional column like so: image.png
  2.  Check the new column and fill down values (this will add the name of the producer into every row. The following steps will just clean up the table. 
  3.  Filter out blanks on Column 4
  4.  Promote Headers
  5.  Delete / filter out rows in column "Customer Name" with value "Customer Name"

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Thanks!  So simple once you know how.  I appreciate the help.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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