4 Replies Latest reply: Nov 26, 2013 4:10 PM by Raghuram Rao RSS

    Question Expression  Syntax

      I have two Data Elements - Bkg_Yr, Bkg_Mth which User can select on.  I have a third field First_Bkg_Dt

       

      How do I create an expression  with this definition

       

      if user has not selected Bkg_Mo then

      Sum({$<First_Bkg_Dt = {">=$(=MakeDate(Bkg_Yr,1,1)"}>} Revenue)

      else

      Sum({$<First_Bkg_Dt = {">=$(=MakeDate(Bkg_Yr,Bkg_Mo,1)"}>} Revenue)

       

      In English this is what I want to achieve:

      If User has selected Bkg_Yr as 2012 and Bkg_Mo as 5 then sum(Revenue) of records with the First_Bkg_Dt > 2012-05-01

      If User has selected Bkg_Yr as 2012 and Bkg_Mo not selected then sum(Revenue) of records with the First_Bkg_Dt > 2012-01-01

       

      Thanks

      Raghu