3 Replies Latest reply on Nov 6, 2018 1:17 PM by Paul Wachtler

    Manually revising my data

    Anita Lee

      My data has region and stores. Stores belong to regions. For some reason, a handful of stores have no assigned region in the database. Can I fix this manually? They belong to regions that are appearing for other stores.


      For example:

      Region Store

      Southwest PPK

      Northeast MFU




      KCC would belong to Southwest and PCK would belong to Northeast. Can I manually add or tag the region so the regions appear in the visualizations?

        • 1. Re: Manually revising my data
          Paul Wachtler

          Hi Anita,


          There's not really a way to add this to your data in Tableau (although that's definitely something that you could do in Excel, SQL or wherever else the data is coming from).


          If there are only a handful of stores that are missing their regions than I'd recommend creating a calculated field like this:

          if not(isnull([Region])) then [Region]

          elseif [Store] = "KCC" then "Southwest"

          elseif [Store] = "PCK" then "Northeast"



          You can add an elseif line for each store that you need to add a region for.




          • 2. Re: Manually revising my data
            Anita Lee

            Thanks Paul. Can I build this calculation into the region or store measure? Rather than dragging it to every visualization, this method would be faster and I wouldn't risk missing it in any visualization.

            • 3. Re: Manually revising my data
              Paul Wachtler

              If you're going to be using that datasource in multiple workbooks, then you can save a copy of the original workbook that has the calculation, and use thatfor your new workbooks, so that it's always copied across. 


              Unfortunately there's not an automatic way to have Tableau know to put the calculation in there just because you're pulling in that same datasource.


              However, if you're data is coming from SQL, you can create a view that has this same calculation and use that as your datasource in Tableau (instead of the original table) and then it would always come into Tableau the way you want it.