Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have an object which goes as follows:
=Sum ( {<[Financial Year]={$(vYears)}>} [Amount])
The variable 'vYears' has two values: 2012 en 2013.
The result is the sum(Amount) for 2012 and 2013.
Now I want to add 1000 only to the year 2012.
I con't figure out how. Any Help?
Thanks!
Message was edited by: Jasper de Vries
Try this
= Sum ({$<[Financial Year] = {$(vYears)}>} Amount ) + If([Financial Year] = 2012, 1000, 0)
If you are using the expression in a textbox,
=Sum ( {<[Financial Year]={$(vYears)}>} [Amount])+1000
should return the correct result, right?
But you are probably using the expression in a chart with multiple dimensions.
But how should the constant value for the year then distributed across your dimension values?
Hi swuehl,
Unfortunately that's not what I mean. If I follow your advise, 1000 wil be added to both years while I want to add 1000 only to one year, while 2 years are shown.
try like these
=Sum ( {<[Financial Year]={$(=(vYears)-1)}>} [Amount])+1000
or
=Sum ( {<[Financial Year]={$(=Max(vYears)-1)}>} [Amount])+1000
or
create varible for 1 year which year you want then make that variable use
Hi ,
try this,
=if($(vYears)='2012',Sum ( {<[Financial Year]={$(vYears)}>} [Amount])+1000,Sum ( {<[Financial Year]={$(vYears)}>} [Amount]))
Regards,
Thanks guys, but I doesn't solve my problem.
I attached an example QVW to my orginal post. Hope this will clarify my issue.
Can you please try below:
= sum ({$<[Financial Year] = {$(vYears)}>} Amount)+sum({$<[Financial Year] = {"2012"}>}1000)
Try this
= Sum ({$<[Financial Year] = {$(vYears)}>} Amount ) + If([Financial Year] = 2012, 1000, 0)
Hi Jasper,
the solution is a simple if condition on Fincancial Year:
=If([Financial Year] = 2012, sum({$<[Financial Year] = {$(vYears)}>} Amount ) +1000, sum({$<[Financial Year] = {$(vYears)}>} Amount))
Enjoy
Burkhard
Hi Jasper,
you can use "IF"code if([Financial Year] = '2012', sum ( {$} Amount ) +1000 , if([Financial Year] = '2013', sum ( {$} Amount ) ))
PFA for help.