2 Replies Latest reply on Feb 5, 2019 3:19 AM by Anita Deshmukh

    Query on Date

    Anita Deshmukh

      Hi Team,

       

      I would like to know if there is a way to display all dates between 2 date range as per the selection in my 2 parameter  "start date" and "end date".

      For ex : Scenario here is there are 2 date dimension: Order date and Ship date and 2 different measures "Profit" and "Sales".

      Order date is used to show the Sum[Profit] ( Running Total) and Ship date will show Sum[Sales] (Running Total Sales).

      I want to create a line chart which will show all the dates  between start date and end date parameter on X axis and 2 lines -one for profit (Running Total) relative to Order date

      and another line will show Sales(Running total) relative to Ship date.

      Also  if I select date between 31st Dec 2017 and 31st Dec 2018 and in database if is there no sales data between these selected dates then also it should show the previous year total sales value between this time range as a  constant line.

       

      It would be grateful if you can help me with the above question.

       

       

      Thanks,

      Anita

        • 1. Re: Query on Date
          Peter Fakan

          Hi Anita,

           

          Grateful if you could upload a .twbx showing your working so far.

           

          Peter

          • 2. Re: Query on Date
            Anita Deshmukh

            Hi Peter,

             

            I am not able to upload the twbx file due to security constraints even though its using sample superstore data only. It would be grateful if you can you give the generic solution.

            The workbook I am using contains the Order date and ship Date on Column shelf. And in row shelf I have used Sum[sales] and Sum[Profit].

            I would like to show Sum[Sales] respective to Order date and Sum[Profit] according to ship date. I know we can use Pivot but is there any other way to achieve the same.

            Also I have 2 parameter start date and end date and if  my end date is Today's date and in Superstore database , there is data till 2017 but then also it should show data as constant for 2019 .It should show the last sum[sales] or profit for today's date also.

             

            Thanks,

            Anita