Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
is it possible to get this?
If I select a year and lets say febr and mars and get the result for the same months in a set analysis like this?
this is what I have stored in a variable for Last Year Month Today and of course I only get the last mont in my selection.
Can I change it in some way to get the two selected months?
PeriodID = {$(=Max(PeriodID) - 12)},
Year = {$(=Max(Year)-1)},
Quarter = ,
Period = ,
Month =
Håkan
My intention is to show the values for febr and mars 2016 in MTD (works fine) and
the values for febr and mars 2015 in LYMTD.
The calculation for MTD is Sum( $(vNettoFörs)) and for the same period last year
Sum({$<$(vSetLYMTD)>} $(vNettoFörs)) where my values in vSetLYMTD is
PeriodID = {$(=Max(PeriodID) - 12)},
Year = {$(=Max(Year)-1)},
Quarter = ,
Period = ,
Month =
But in this case I get the value for mars 2015 not febr and mars 2015.
Håkan
Hi,
Alter your variable add >=
vSetLYMTD is
PeriodID = {">=$(=Max(PeriodID) - 12)"},
Year = {$(=Max(Year)-1)},
Quarter = ,
Period = ,
Month =
Regards,
Prashant
as I said above.....
Also you don't NEED that periodID set! Gah! Come on!! its already a given based on the year (Again as I said above)
vSetLYMTD is
PeriodID = ,
Year = {$(=Max(Year)-1)},
Quarter = ,
Period =
edited to remove month thanks mgrabara_bpx
In this case do I get the whole 2015
Hi,
Do you people even read anothers posts or just gathering points? This community is getting worse and worse.
Håkan - please check my expression, that should solve your problem
Adam Davies - this won't work because you disregarded "Month" so Håkan selection over months will be ommitted
BR,
Milosz
Hi Milosz,
Your answer actually has exactly the same result at the original answer I posted
sum({<PeriodID={">=$(=Max(PeriodID) - 12)"}>}yourfield)
Its just a slightly different way of doing it.
There are many different ways of doing this, however you are correct in that month should not have been included in my answer, thank you for spotting that
Hi,
Adam I agree with your solution but only when PeriodID is unique for year and month and going from "1 to n". I assumed that in Håkan's data it can be for example from 1 to 12 for every year repeating. But we don't know that actually. I think he could try both methods and check if values are correct.
BR,
Milosz
Totally agree Milosz, without knowing the exact setup it is possible to have many different answers which leads to a lot of ambiguity.
p.s. I also agree with your comment re the community, I remember a time when you could help someone out without 43 other people jumping in to give the same answer. Its the points system IMHO it breeds this bad behaviour
Hello Miloz,
yes, you are correct, this is the right answer, I misspelled when I tried it
Now it works fine.