2 Replies Latest reply: Jan 24, 2018 1:11 AM by wajiha khan RSS

    Prior Month

    wajiha khan

      Hi

       

      I have a field monthyear in this 'Jan-14' format.

      Now i want to minus one month from this monthyear field

      so i made a variable vPrvmonth in which i set an expression as

       

      =Date(Addmonths(max(monthyear), -1),'MMM')

       

      This variable is working fine and giving me a prior month from the month i have selected.

      Like i have selected March then it is giving me Feb.

      Now when i am using this variable in my expression for a measure then i got blank results.

      I have tried so many expressions but not getting any result

       

      Sum({<monthyear = {'$(vPrvmonth)'}>}M2)

      Sum({<Month = {'$(vPrvmonth)'}>}M2)

       

      What i am missing? What is the right expression?

      Please guide me

       

      Thanks