6 Replies Latest reply on Jun 29, 2018 6:57 AM by Kasper Silverforsen

    How to find which release type is the latest of a product?

    Kasper Silverforsen

      Hi,
      I have a lot of data on different products and release types.

      I need to be able to sort out the latest releases of each product. My idea is to find which release has its first data point the latest.
      My thought process goes something like this.

       

       

      MinRel = { Fixed [Release]  : MIN([Time1]) }

      ReleaseTime = { Fixed [Product]  : MAX(MinRel) }

       

      LatestReleases = { FIXED  [Product] : MIN(IF [Time1] = [ReleaseTime] THEN [Release] END)}

       

      But it does not do the trick. Anyone have any ideas on how to do this?

       

      BRs,
      /K

        • 1. Re: How to find which release type is the latest of a product?
          Tushar  More

          Hi Kasper,

           

          Without looking at your data, try creating a calculated field.

           

           

          {fixed [product]:max([release])}

           

          ~Tushar

          • 2. Re: How to find which release type is the latest of a product?
            Jim Dehner

            Hi Kasper

            you are on a good track   - assuming (always a dangerous thing )- that time1 is a date associated with product sales

            for each product the latest release date if {fixed [product]:min(time1)}

            then the last of all release dates is {fixed:max(release date) }

             

            if you want to find the product associated with it you can do that with a filter or with a conditional statement

            If [release date] = [Last or all release dates] then [product] end

             

            you may need to play with the syntact - wasn't able to check it out - you didn't include a twbx workbook with your data

            Jim

            If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

            • 3. Re: How to find which release type is the latest of a product?
              Mahfooj Khan

              Hi Kasper,

               

              Without seeing your data It'll very difficult to give any solution. However, I've tried to replicate your scenario with dummy data.

              Here is my approach, lets assume you've below data.

              Final output.

              I've created several calculated fields. Workbook attached for your reference. Let us know it this help.

               

              Note: you may include any dimension in the LOD{} expression as per your requirement to get the correct result.

               

              Mahfooj

              • 4. Re: How to find which release type is the latest of a product?
                Kasper Silverforsen

                I was a bit unclear in my original post, thank you for all the help. My problem is that I do not have any specific release date for each release. Unfortunately I can't share my data or workbook. I have data on the Upgrade Failure Rate of different products during different dates. So for a specific date I can have data from several releases. In order to find data on the latest release I must find which release has its first data point the latest. Is it a bit more clear?

                • 5. Re: How to find which release type is the latest of a product?
                  Jim Dehner

                  good morning

                  what happened when you tried this?

                   

                  Hi Kasper

                  you are on a good track   - assuming (always a dangerous thing )- that time1 is a date associated with product sales

                  for each product the latest release date if {fixed [product]:min(time1)}

                  then the last of all release dates is {fixed:max(release date) }

                   

                  if you want to find the product associated with it you can do that with a filter or with a conditional statement

                  If min([release date]) = [Last or all release dates] then attr([product]) end

                   

                  you may need to play with the syntact - wasn't able to check it out - you didn't include a twbx workbook with your data

                  Jim

                  If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

                  If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

                  • 6. Re: How to find which release type is the latest of a product?
                    Kasper Silverforsen

                    Hi
                    I decided to try and solve the issue in the back end.
                    I have now as input variable for each product which release name is the latest realese.
                    I am now trying to do it like this

                     

                     

                    CASE [Release Type]

                        WHEN "Latest" THEN

                        IF [Latest Release] = [Release] THEN [Release] END

                        WHEN "All" THEN

                        [Release]

                    END

                     

                    The problem is that the case "Latest" gives a "Null" option in the quick filter. This is weird since I do not have any Null values in Release or Latest Release Dimension. Is there a way to remove this Null value from the filter?

                     

                    BRs,
                    K