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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Super User
Super User

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
Super User
Super User

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors