Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello ppl!
I have a question!
Ived created a variable called vPreviousMonth =month(addmonths(max(Date_Clean),-1))
I want a straight table which shows current month i have selected (ive made that) and then i want the previous table to show previous month
e.g. If i am in November i also want to see October - If i am in July, i also want to see June..
How do i make that expression?
My expression for currentmonth looks like this:
=Sum({<Month=, Year=,2012={'>=$(=MonthStart(Max(2012)))<=$(=Max(2012))'}>}BuyPriceRealized)
I dont know if that expression is correct if not i would also like to know how the "right" way is to do it...
Thanks ALOT!!
no change required in expression
see below code
first expression
Sum({$<Month={"$(vCurrMonth)"}>}Volume)
second expression
Sum({$<Month={"$(vLastMonth)"}>}Volume)
third expression
=Column(1)-Column(2)
hope this helps
I have only founded soulution where they use TODAY, -1 or -2 etc etc.. But i dont want it to be hardcoded As you can see my currentmonth is not hardcoded and changes every time i select a new month
The only thing to note with the attached example is that the year may be confusing... For example, if you select Jan, the past month will be Dec, but it would be for the same year unless you specify otherwise.
Hi,
let us take example u have month field name( jan, feb, mar.......dec for year 2012
so u can create a variabe vmonth = Month
and in the expression
=Sum({<Month={ '$(vmonth)'}, Year=2012)'}>}BuyPriceRealized) this will show the month u have selected for year 2012
for previous year calculation i would suggest take the month number and convert into previous month number and then convert into month name in the expression..
Thats okay cause i only have one year.
But i already have current month i am in. I only need previous month
Anybody else who have an suggestion?
Your expression does not work e:/ But anyhow ived already made currentmonth Can u explain what u mean by converting? or give me an example - It should be previousmonth not previousyearmonth
Thanks in advanced!
why Not Use MonthYear
vCurrMonth== Max(MonthYear)
vPrevMonth==Date(addmonths(Max(MonthYear),-1),'MMM-YYYY')
and In Label Left(vCurrMonth,3) and Left(vPrevMonth,3)
hope this helps
So i create a variable called vCurrMonth and a variable called vPrevMonth
What do i write in my expressions then for my straight table? Just the Variable???