Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hi,
vPrvmonth
=Date(Addmonths(max(monthyear), -1),'MMM-YY')
Variable date format should be Month Year.
Because monthyear field format also Monthyear..
I have changed the format but still not getting the desired result.
Actually there is some issue in below expression of measure where the variable is used
Sum({<monthyear = {'$(vPrvmonth)'}>}M2)
Sum({<Month = {'$(vPrvmonth)'}>}M2)