2 Replies Latest reply on Oct 30, 2017 3:46 AM by Artee Jajoo

    Date Calculation

    sudhir ranajn

      Hi Experts,


      In my project I am getting a problem like I have explained below.

      If I select "2015-Jan" as cohort time, then it should give me jan-2015 to Dec-2015.

      If I select "2016-Jan" as cohort time, then it should give me Jan-2016 to Dec-2016

      Like wise I need for every year from "order date" present in sample super store. I need each cohort time as a parameter drop down selection.


      Please help me with this.


      Thanks in Advance!


        • 1. Re: Date Calculation
          Norbert Maijoor

          Hi Sudhir,


          Not sure but find my approach as reference below and stored in attached workbook version 10.3 located in the original thread



          1. Year(Order date)



          if [year]=2015 then "2015-Jan"

          elseif [year]=2016 then "2016-Jan"

          elseif [year]=2017 then "2017-Jan"

          elseif [year]=2014 then "2014-Jan"



          3. Drag required objects to the indicated locations.





          • 2. Re: Date Calculation
            Artee Jajoo

            Hi Sudhir,


            Please follow the steps below to address your requirement -

            1. Create a new calculated field Cohort Time

            2. Create a parameter on this calculated field

            3. Create a new sales calculated field to get data only for the year of the parameter Sales - New

            4. Apply a filter to exclude the null values of Sales - New from the viz

            5. Create Viz with Cohort Time or Order date in columns and Sum(Sales - New ) in rows.


            Attached is the .twbx file.