Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am moving my set analysis expression to variable and using that variable into charts for calculation but the variable shows error message like "Error:Garbage After Expression 'K'"(In set analysis expression calculates amount and converted amount into 'M'(Million),'K'(Thousand's)).when I used the the variable 'vPremium_Amount' it shows values but not exactly correct, when I used $(vPremium_Amount) it doesn't show any value shows error message.please help me to resolve this issue.
Thanks in advance.
Best Regards
Anusha k
if you use = in variable is already calculated in declararion -->Variable overview.
please post your expression.Might be some where your expression is going wrong.
if you use = in variable is already calculated in declararion -->Variable overview.
please post your expression.Might be some where your expression is going wrong.
Hi,
Post ur expression as well as variable expression
This is my set expression
If((Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([Life Annual Premium ]*if([ Premium Type]='Z',1,0))+([ Life Sing Premium Amount]*if([ Premium Type]='S',1,0)))
+ Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([ AnnulPremium Amount]*if([ Premium Type]='Z',1,0))+([ SingPremium Amount]*if([ Premium Type]='S',1,0)))+
Sum({<PrYear={"$(=Max(PrYear))"},PrMonth={"=$(=Max(PrMonth))"}>} [ Premium Amount])) > 1000000,
Num(Round((Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([Life Annual Premium ]*if([ Premium Type]='Z',1,0))+([ Life Sing Premium Amount]*if([ Premium Type]='S',1,0)))
+ Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([ AnnulPremium Amount]*if([ Premium Type]='Z',1,0))+([ SingPremium Amount]*if([ Premium Type]='S',1,0)))+
Sum({<PrYear={"$(=Max(PrYear))"},PrMonth={"=$(=Max(PrMonth))"}>} [ Premium Amount])) /1000000),'$#,##0 M'),
If((Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([Life Annual Premium ]*if([ Premium Type]='Z',1,0))+([ Life Sing Premium Amount]*if([ Premium Type]='S',1,0)))
+ Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([ AnnulPremium Amount]*if([ Premium Type]='Z',1,0))+([ SingPremium Amount]*if([ Premium Type]='S',1,0)))+
Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} [ Premium Amount]) ) > 1000,
Num(Round((Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([Life Annual Premium ]*if([ Premium Type]='Z',1,0))+([ Life Sing Premium Amount]*if([ Premium Type]='S',1,0)))
+ Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([ AnnulPremium Amount]*if([ Premium Type]='Z',1,0))+([ SingPremium Amount]*if([ Premium Type]='S',1,0)))+
Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} [ Premium Amount])) /1000),'$#,##0 K'),
Num(Round(Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([Life Annual Premium ]*if([ Premium Type]='Z',1,0))+([ Life Sing Premium Amount]*if([ Premium Type]='S',1,0)))
+ Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([ AnnulPremium Amount]*if([ Premium Type]='Z',1,0))+([ Sing Premium Amount]*if([ Premium Type]='S',1,0)))+
Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} [ Premium Amount])),'$#,##0')))
I keep this expression into a variable
vAmount=If((Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([Life Annual Premium ]*if([ Premium Type]='Z',1,0))+([ Life Sing Premium Amount]*if([ Premium Type]='S',1,0)))
+ Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([ AnnulPremium Amount]*if([ Premium Type]='Z',1,0))+([ SingPremium Amount]*if([ Premium Type]='S',1,0)))+
Sum({<PrYear={"$(=Max(PrYear))"},PrMonth={"=$(=Max(PrMonth))"}>} [ Premium Amount])) > 1000000,
Num(Round((Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([Life Annual Premium ]*if([ Premium Type]='Z',1,0))+([ Life Sing Premium Amount]*if([ Premium Type]='S',1,0)))
+ Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([ AnnulPremium Amount]*if([ Premium Type]='Z',1,0))+([ SingPremium Amount]*if([ Premium Type]='S',1,0)))+
Sum({<PrYear={"$(=Max(PrYear))"},PrMonth={"=$(=Max(PrMonth))"}>} [ Premium Amount])) /1000000),'$#,##0 M'),
If((Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([Life Annual Premium ]*if([ Premium Type]='Z',1,0))+([ Life Sing Premium Amount]*if([ Premium Type]='S',1,0)))
+ Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([ AnnulPremium Amount]*if([ Premium Type]='Z',1,0))+([ SingPremium Amount]*if([ Premium Type]='S',1,0)))+
Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} [ Premium Amount]) ) > 1000,
Num(Round((Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([Life Annual Premium ]*if([ Premium Type]='Z',1,0))+([ Life Sing Premium Amount]*if([ Premium Type]='S',1,0)))
+ Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([ AnnulPremium Amount]*if([ Premium Type]='Z',1,0))+([ SingPremium Amount]*if([ Premium Type]='S',1,0)))+
Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} [ Premium Amount])) /1000),'$#,##0 K'),
Num(Round(Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([Life Annual Premium ]*if([ Premium Type]='Z',1,0))+([ Life Sing Premium Amount]*if([ Premium Type]='S',1,0)))
+ Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} ([ AnnulPremium Amount]*if([ Premium Type]='Z',1,0))+([ Sing Premium Amount]*if([ Premium Type]='S',1,0)))+
Sum({<PrYear={"$(=Max(PrYear)-1)"},PrMonth={"=$(=Max(PrMonth))"}>} [ Premium Amount])),'$#,##0')))
If i use this variable $(vAmount) it Shows error like garbage after 'k'
or 'm'.
Thankyou Praveena