Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Consider the following data
Month Value
201204 500
201205 750
201206 850
201207 600
201208 900
201209 (blank)
I want to show, in a text box, the value for max(Month()-1). The textbox should always show the Value 900 (for this specific set of data), even when I choose another Month. Of course when month 201210 is added the 201209 Value will be filled in, and this is at that point the Value that should be shown in the text box.
How should I construct such a formula ?
Thank you,
David
=sum({<Month={"$(=max({<Month=>} Month)-1)"}>} Value)
and a check would be something like :
if(right(Month,2) - 1 < 52 etc
sum({<Month={"$(=max(Month)-1)"}>} Value)
But you need to add a check when Month - 1 goes to previous year.
Hi Ioannis,
Thanks for the input!
First of all, how do I check for previous year as you describe?
Also, when I use your formula it is not showing the Max()-1 result when I do a selection on month, in fact it returns the selected month's result. How can I adjust the formula to only return the Max()-1 month eventhough another month is explicitely selected?
Thank you,
David
=sum({<Month={"$(=max({<Month=>} Month)-1)"}>} Value)
and a check would be something like :
if(right(Month,2) - 1 < 52 etc
Thank you Ioannis! This is what I am looking for!