1 Reply Latest reply on Nov 26, 2016 3:26 AM by Bora Beran

    Data structure for comparing two companies' income statement over time

    Roger Entner

      Hi,

       

      I am trying to compare the income statement of two companies over time. How do I best structure the data in Excel or Google Sheets?

       

                                                                  Amount

      Company Name / Date / Revenue

       

      or

                                          Company 1 / Company 2              

      Date / Revenue

       

       

      I'd appreciate any help or suggestions.

        • 1. Re: Data structure for comparing two companies' income statement over time
          Bora Beran

          The easiest is to have each company's revenue in a separate column but you could make it work either way. If you have a long table i.e. Company Names are held in different rows you can write a calculated field like

           

          IF [Company Name]='X' then [Revenue] END

           

          and another calculated field like

           

          IF [Company Name]='Y' then [Revenue] END

           

          To break them into separate columns using calculated fields in Tableau. This treats rows that don't have that particular company name as NULLs so when you SUM etc. they are ignored.