Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago

Setting up a mapping table for a nested income statement

Hi,

It's been some time since I have used dax/power query to do this so I am hoping it has gotten easier.

I have an income statement layout where I want the layout in Power BI to look like this.  What is the best way to map each GL so that I can have the subtotals and totals calculate correctly?   I will probably need to add IS line iems later so I am hoping to come up with something fairly dynamic. Thanks

Sales100
Sales-Direct100
Sales-Subcontractor100
Sales - Labor100
Sales - Freight100
Total Sales500
Sales Returns & Allowances-100
Net Sales 400
  
Cost of Goods Sold50
Cos-Direct50
Cos-Subcontractor50
Cost of Goods Sold - Labor50
Cos-Freight50
Sales COGS250
Sales Contribution150
% Sales38%
  
Loss/(Gain) on Inventory12
Vendor Rebates44
Early Pay Discounts58
Freight Variance62
Transfer Freight38
Total Cost of Goods Sold464
  
Gross Profit-64
Gross Profit %-16%

6 Replies

  • elitesmitpatel's avatar
    elitesmitpatel
    Solution Supplier

    Q-> What is the best way to map each GL so that I can have the subtotals and totals calculate correctly? 
    Ans-> Mapping is compeltely depended on your company requirement and the expected output. We have less data to make this decision.

    If i helps Kudos to work and Accpet it as Solution.

  • Anonymous's avatar
    Anonymous
    Not applicable

    I know that. I am trying to get the totals and subtotals to work and am wondering the best strategy for mapping the data.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Thanks. I am trying to create something that looks like this using the data below in bold. I need this to work in Power BI or in Excel as the client really wants to use an Excel UI.  I just need help with how to create the mapping such that I can do subtotals, insert blank rows, etc. etc.   Thanks

        PS. I cannot upload a file. 

        IS ItemOriginal IndexTotal
        Sales1400
        Sales-Direct2100
        Sales-Subcontractor350
        Sales - Labor420
        Sales - Freight50
        Total Sales60
        Sales Returns & Allowances7-25
        Net Sales 8545
         9 
        Cost of Goods Sold1020
        Cos-Direct1121
        Cos-Subcontractor1222
        Cost of Goods Sold - Labor1323
        Cos-Freight1424
        Sales COGS15110
        Sales Contribution16435
        % Sales1720%
         18 
        Loss/(Gain) on Inventory1930
        Vendor Rebates2032
        Early Pay Discounts2133
        Freight Variance2234
        Transfer Freight2335
        Total Cost of Goods Sold24599
         25 
        Gross Profit26-54
        Gross Profit %27-10.0926

         

         

         

        IS ItemAmountGl
        Sales10049
        Sales10044
        Sales10045
        Sales10046
        Sales-Direct5047
        Sales-Direct5048
        Sales-Subcontractor2543
        Sales-Subcontractor2542
        Sales - Labor1041
        Sales - Labor1041
        Sales Returns & Allowances-2540
           
        Cost of Goods Sold2050
        Cos-Direct2151
        Cos-Subcontractor2252
        Cost of Goods Sold - Labor2353
        Cos-Freight2454
        Loss/(Gain) on Inventory3055
        Vendor Rebates3256
        Early Pay Discounts3357
        Freight Variance3458
        Transfer Freight3559
           
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    It's hard to see the correlation between them from the sample data you provided. Can you tell me the calculation logic for these two columns in the expected output?

     

     

     

    Best regards,

    Mengmeng Li