4 Replies Latest reply on Feb 17, 2019 5:51 AM by Anita Deshmukh

    Date Query

    Anita Deshmukh

      Hi Everyone,

       

      I would like to know if we can showcase data for those date which doesnot exist in database. For ex- I would like to showcase sales and profit for date till 2019. I our sample superstore database , order date and ship date is only till 2016. But I want to show sales for year till 2019 . So is there any calculation we can create which will showcase  2016 year sales value as a constant line for year till 2019.

      Attaching the workbook for your reference.

       

      Thanks,

      Anita

        • 1. Re: Date Query
          Zhouyi Zhang

          Hi, Anita

           

          Not sure whether you are able to join your data to a calendar table which contains the data from whatever your data begin with and to future dates to 2019. and then use the calendar as your axis in your view.

           

          ZZ

          • 2. Re: Date Query
            Anita Deshmukh

            Hi Zhouyi,

             

            Thanks for your reply. Joining single table with Calendar gives me the correct output, But in my project multiple joins with multiple tables are used . So after applying any filter, data is not coming for all date values.

            I would like to know if there is any other way to achieve the sales data for all date values.

             

            Thanks,

            Anita

            • 3. Re: Date Query
              Zhouyi Zhang

              Hi, Anita

               

              Unfortunately, I don't think there will be other way as you can think that how does tableau know to generate underlining data for how long.

               

              ZZ

              • 4. Re: Date Query
                Anita Deshmukh

                HI Zhouyi,

                 

                Thanks for the reply.Joining Orders Table with Calendar table gives the desired output.  But here if we join with another datasources like i have joined People with Orders table and used region as filter from People's table , then data is getting truncated to the  known years only, Not getting output for year 2019.

                 

                Attaching sample workbook for your reference(Please refer to "Region wise Sales" sheet) . It would be very grateful if you can assist me to get all data for all date values in this scenario also.

                 

                 

                Thanks,

                Anita