3 Replies Latest reply: Nov 21, 2017 5:52 PM by Luis Madriz RSS

    Calculate Month To date MTD

    izzat azfar8

      Hi, I have a problem to calculate Month To date MTD in my data. Is it my format in excel wrong or what? I will share the both file.
      PAC Platform in excel is just a file to concatenate with the file named "book1" on field name only.

        • Re: Calculate Month To date MTD
          Luis Madriz

          Hi Izzat,

           

          What expression are you using to calculate MTD? Maybe you could start with something like this: Sum(IF([date]>=Monthstart(today()),gasdaily))

           

          You may want to use a Master Calendar. If you want to create a master calendar based on your date field you may want to check this one I did a while ago: https://community.qlik.com/docs/DOC-19202

           

          I hope this helps,

           

          Cheers,

           

          Luis

          • Re: Calculate Month To date MTD
            rohit lohani

            hi izzat azfar ,

             

            try this expression to get ur desire result to calculate mtd ,

             

            Sum({<OrderDate={">=$(=(MonthStart(Max(OrderDate))))<=$(=Max(OrderDate))"},Year=,Month=>} [ urfeild])

             

            hope this will work ,

             

            regards

            rohit

            • Re: Calculate Month To date MTD
              Luis Madriz

              Hi,

               

              Just wondering to know how you went about this one,

               

              Cheers,

               

              Luis

               

              PS. When applicable please mark the appropriate replies as Correct. This will help community members know which discussions have already been addressed and have a possible known solution. Please mark replies as Helpful if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as Helpful if you feel additional info is useful to others