Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Could anybody help me to correct my variable:
vRevenueTotalMax = sum({$<FYear = {$(=Max(FYear))}, OrderPhase_Desc = {Revenue}>} NettAmount$(vCurrency));
I would like to see the Revenue for the Maximum Year that I choose from a List box. But it´s not calculating anything.
It´s for sure something about brackets etc or similar...
Many thanks for your comments.
Best regards
Carolin
Depending on format of your year (date?) consider the following:
use the date function to give the set expression the string it is expecting using the dual date function
{<Month='$(=Date(AddMonths(Date#(Max([$(=Dimension)]),'YYYYM'),-1),'MMM-YY'))'>}
Unfortunately not - I maybe this information helps:
This is working:
= sum({$<OrderPhase_Desc = {Revenue}>} NettAmount$(vCurrency))
This is not working:
= sum({$<FYear = {"$(=Max(FYear))"}>} NettAmount$(vCurrency))
Is your FYear a number? try MaxString(FYear)
Good question - I didn´t know it and tried but unfortunately it still didn´t work...
does it works?
= sum({$<FYear = {2014}>} NettAmount$(vCurrency))
and what's the result of a textbox with?
=Max(FYear)
Remove the label from your expression. Then hover over the column heading and you'll be able to see exactly how the expression is being expanded. That may provide a clue.
-Rob
=Max ( FYear) gives me the maximum year from the selection that I do in a Listbox, which is correct.
This is working, too:
=sum({$<FYear = {2014}, OrderPhase_Desc = {$(vOrderPhaseDesc)}>}NettAmount$(vCurrency))
I think we are getting close now. In a textbox this is working and gives a correct result:
=sum({$<FYear = {$(=Max(FYear))}, OrderPhase_Desc = {'Revenue'}>} NettAmount$(vCurrency))
Now I used this to set a variable:
set vRevenueTotalMax = sum({$<FYear = {$(=Max(FYear))}, OrderPhase_Desc = {'Revenue'}>} NettAmount$(vCurrency));
Then I used the variable in a text box but the result is Null:
=$(=vRevenueTotalMax)
- replace in working expression 2014 with "$(=Max(FYear))"
- read Rob suggestion
- what's the expression expanded if you select year 2014, 2013, .....?
do you get 2014 for "$(=Max(FYear))" or what?
or post your doc
TRY THIS
=vRevenueTotalMax
OR
=$(vRevenueTotalMax)