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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Working with Multiple headers in Power Query

Hi All,

 

The below data set is of a particular branch (there are more than 100 branches in our company)extracted from Tally. I am finding it diffucult to work with multiple headers in the balance sheet and every branch has different line items and finally i am supposed to consolidate all the branches together to give the final report.

 

Please suggest me a solution to how segregate the line items under each (Common) header so that i can add other branches under the same headers.

 

Sales Accounts (Common Header)xxxxxx.00
Branch Transfer Outward IntraStatexxxxx.00 
Sales Grease IntraStatexxxx.00 
Sales - Local 
Sales Oil Intrastatexxxx0.00 
Sales Stabilizers IntraState 
Sales_Interstatexxxx0.00 
Sales_Intrastatexxxxx01.62 
Sales_Oil_Intrastate 
Service VAS Local 
Direct Incomes (Common header)xxxx7.00
VAS - Spares 
Discount Received - Principalxxxx7.00 
Packing & Forwarding Charges (Sales)xxx0.00 
Pragati Spare Commission 
  xxxxxx98.62
Cost of Sales  (Common header)xxxxx4.97
Opening Stockxxxxx16.49 
Add: Purchase Accountsxxxxx3.90 
Less: Closing Stockxxxx7.42 
 xxxx2.97 
Direct Expenses( Common Header)xxxx2.00 
Franchisee Spare Commission 
Freight & Cartridge (GST)xxxx2.00 
Freight Charges - URDxxxx0.00 
Packing & Forwarding Charges - Inward 
Gross Profit  (Common Header)xxxxxxx3.65
Income Statement: 
Indirect Incomes(Common Header)xxxxxxx9.00
AMC  
Marketing Incomexxxxx5.00 
Other Income 
Service Incomexxxxxxx4.00 
Tech Centre Income 
VAS Service 
Scrap Sales 
  xxxx2.65
Indirect Expenses  (Common Header)xxxx8.64
Franchisee - AMC Commissionxxx10.00 
Labour Charges 
Loading & Unloading Chargesxxxx0.00 
Reconditioning Expenses 
Rounded Off 
Tools & Spares for Servicing 
Tools & Spares for Servicing - Under Warrantyxxxx8.64 
ADMINISTRATION EXPENSES (Common Header)xxxxx61.81
Branding Expenses 
Communication Expensesxxxx0.00 
Information Technology Expenses 
Local Conveyance & Car Hire chargesxxx68.00 
Office Expensesxxx82.51 
Rentxxxxx0.00 
Vehicle Expenses - Petrol 
Vehicle Expenses - Tyre 
Vehicle Maintanance 
Audit Related Expenses 
Books News Paper & Periodicalsxxx4.00 
Consumable Tools 
Courier & Postage Chargesxx5.00 
Customer Training Expenses - Tech Centrexxxx0.00 
Data Card & Internet Expensesxxx6.00 
Electricity & Water Charges 
Happay Card Maintenance Charges 
Insurance Charges - Vehicles 
Internal Meeting Expensesxxx5.00 
ISO Expensesxxx8.00 
Legal & Professional Chargesxxx0.00 
Mobile Expensesxxxx1.12 
Outstation Travel Expenses - Marketing 
Outstation Travel Expenses - Meeting & Conferencexxxx5.00 
Outstation Travel Expenses - Servicexxx75.00 
Outstation Travel Expenses - Trainingxxxx96.00 
Printing & Stationery Expensesxxx82.00 
Repair & Maintenance Expensesxxxx0.00 
Short & Excess Recoveryxx1.09 
Toll & Parking Charges 
Vehicle Expenses Maintenance - Bike - Admin
Vehicle Expenses Maintenance - Bike - Marketingxxxx1.00 
Vehicle Expenses Maintenance - Bike - Servicexxxx5.00 
Vehicle Expenses Maintenance - Car - Marketingxxxx7.00 
Vehicle Expenses Maintenance - Car - Servicexx20.00 
Vehicle Expenses Petrol - Bike - Adminxxxx0.00 
Vehicle Expenses Petrol - Bike - Marketingxxxx1.00 
Vehicle Expenses Petrol - Bike - Servicexxxx7.98 
Vehicle Expenses Petrol - Car - Marketingxxxx40.40 
Vehicle Expenses Petrol - Car - Servicexxxx50.71 
DEPRECIATION (Common Header) 
Employees Remuneration & Benefitsxxxx08.00
Contribution to Providend & Other Fundsxxxx3.00 
Staff Welfare Expensesxxxx0.00 
L.T.A.xxxx4.00 
Medical Allowancexxxx2.00 
Mobile Allowancexxxx00.00 
Pay & Salaryxxxx19.00 
Shoe Allowancexxx00.00 
Vehicle Allowancexxx0.00 
Finance Expensesxx.90
Bank Chargesxx.90 
Bank Charges -MSF 
Nett Profit (Common Header)xxxxx.30

 

 

Thank you.

 

Warm Regards(Shrikant)

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I cleaned one sheet using power query  ( created a single column with the common headers while doing so )and used the steps to create a function. Applied the function on other sheets and then appended . Worked for me


@Stachu wrote:

I would have a single table listing the common headers, like this

Sales Accounts
Direct Incomes
Cost of Sales 
Direct Expenses
Gross Profit 
Indirect Incomes
Indirect Expenses 
ADMINISTRATION EXPENSES
DEPRECIATION
Nett Profit

I would then append the data from all the branches, merge it with this table and use the filter out all unnecessary rows 



.

 

Regards

View solution in original post

2 REPLIES 2
Stachu
Community Champion
Community Champion

I would have a single table listing the common headers, like this

Sales Accounts
Direct Incomes
Cost of Sales 
Direct Expenses
Gross Profit 
Indirect Incomes
Indirect Expenses 
ADMINISTRATION EXPENSES
DEPRECIATION
Nett Profit

I would then append the data from all the branches, merge it with this table and use the filter out all unnecessary rows 



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Anonymous
Not applicable

I cleaned one sheet using power query  ( created a single column with the common headers while doing so )and used the steps to create a function. Applied the function on other sheets and then appended . Worked for me


@Stachu wrote:

I would have a single table listing the common headers, like this

Sales Accounts
Direct Incomes
Cost of Sales 
Direct Expenses
Gross Profit 
Indirect Incomes
Indirect Expenses 
ADMINISTRATION EXPENSES
DEPRECIATION
Nett Profit

I would then append the data from all the branches, merge it with this table and use the filter out all unnecessary rows 



.

 

Regards

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.