Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have requirement where I need to find out current year sales.Looks below expression is good for current year.
Sum({<Year = {'$(=Year(Today()))'}>}Sales)
But my requirement is i want to find out the current year sales based Variable value.
for example:
my Variable is "vIndicator",this variablewill store the values like A,B,C.
I want to find the current year sales where variable :vIndicator" value is 'A'
Sum({<Year = {'$(=Year(Today()))'}>,sum(if($(Indicator)='A')Sales)??
Any suggestions ?
Thanks
Sasi, Looks your solution not working .
finally I got it here below the expression.
sum(if(Year=$(vCurrentYear),if($(vIndicator)='3. Due Later',[Undelivered Net value USD])))
Thanks to all for your valuable suggestions.
Hi Swathiraj,
How is your variable value?
If it is based on some field value, then you can use the below.
Sum({<Year = {'$(=Year(Today()))'}, Field={'$(=$(vIndicator))'}>})Sales)
Hello,
use
Sum({<Year = {'$(=Year(Today()))'}, Indicator ={'$(=vIndicator)'} >}Sales)
Regards
Hi,
Try something like this
Sum({<Year = {'$(=Year(Today()))'},Field={'$(=vIndicator)'}>Sales)
Make sure you replace Field with your actual field
Regards
ASHFAQ
Thanks for your reply,
No my variable value is not based on field.
I need to sum the based on like this way
sum(if($(vIndicator)='A',Sales))--->it will give the all years sales where variable =A,
but I want only for current year.
Thanku Ashfaq but your requirement suits when we use field.
but my requirement looks like below
sum(if($(vIndicator)='A',Sales))--->it will give the all years sales where variable =A,
but I want only for current year.
Post sample data with expected output.
why you need to filter with variable if it is not associated.
Regards
ASHFAQ
Hi
Tell me what is the expression/Logic your using in vIndicator
then it will be easy
Hi,
Because my variable has created multiple field condition from multiple tables.
here is the var condition,
If ([VAR ETO]='ETO', if([Suspension Flag - MM]<> '#' ,'A',
If(Today()- RDD = 0, 'B',
If([Qty Open] > 0 And RDD < Today(), 'C',
If([YearMonth RDD]=vYearMonthCurrentDate, 'D',
If( [YearMonth RDD]<>vYearMonthCurrentDate , 'E',
If([Qty Open] <=0, '4. Delivered'))))))
Now I want to find the sales only for variable value as A.
hi,
hi,
will it work to find vindicator = A for current year??
if(year=$(vCurrentYear),sum(if($(vIndicator)='A',Sales))