4 Replies Latest reply: Oct 6, 2017 8:19 AM by Raaj JAIN RSS

    Min Max Date function in Qliksense

    Raaj JAIN

      Dear Friends,

       

      I have a sales history table.

      I would like to filter max Transaction date for each material,

      There are many fields but I am focusing only on Material and Trasaction date.

       

      Currently I am using following formula

       

      Material

      Max(TransactionDate) as MaxTransDate

       

      All other fields are commented.

      owever, there is error and i donot get the desired result.

       

      May be you can tell me how to use the max function.

        • Re: Min Max Date function in Qliksense
          Anand Chouhan

          Did you use Group by with this expression.

           

          Ex:-

                  Load

                  Material,

          Max(TransactionDate) as MaxTransDate

                  From TableName Group BY Material;

          • Re: Min Max Date function in Qliksense
            Pratik Bhor

            Try this,

             

            Load

            Max(TransactionDate) as MaxTransDate

                    From TableName ;

             

            Regards,

            Pratik Bhor

            • Re: Min Max Date function in Qliksense
              Raaj JAIN

              Dears,

               

              I have a table showing Inventory per material, last 6 month sales , previous month sales. This is working fine.

              Now user want to see last Transaction date. That's why i asked earlier how to get max date per material.

               

              I am using following script.

               

              NoConcatenate
              DailyInventory:

              Load *
              Resident DailyInventory_tmp;

              Concatenate(DailyInventory)
              Load *
              Resident SalesPV_6Months;


              Concatenate(DailyInventory)
              Load *
              Resident SalesPV_1Month;


              Concatenate(DailyInventory)
              Load *
              Resident MaxTransactionDate;


              DROP Table DailyInventory_tmp;
              DROP Table SalesPV_1Month;
              DROP Table SalesPV_6Months;
              DROP Table MaxTransactionDate;

               

              See below result Max Transaction date is not coming in same line but in the second line.

              Seems I am doing soemthing wrong.

               

                 

              MaterialMaxDateProduct(InventoryQuantity)(P6M_SalesQty)(PM_SalesQty)
              000000000000105035             -178.965257.87251.710
              00000000000010503529.09.2017000