Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Experts!
My issue is this.
I have linked refunded policies with refunded GL transfer balances. The link was basically with Credit note no. I need following conditions to be met & once it is met to compute Rs 250/= for all such cases.Followings are my conditions,
Class code= MC, M4
Reasons=Customer request
Premium< CR_PREMIUM
then to calculate Rs 250/=
To incorporate above, I have applied following set expression but it doesn't produce expected results. Can my dear friends to look in to this & see where I have gone wrong!
SUM({<REASON={'CUSTOMER REQUEST'},CLASS_CODE={'MC','M4'},PREMIUM ={"=PREMIUM>CR_PREMIUM" }>}250)
Regds
Neville
Not sure if you are trying to obtain a distinct value of 250 for each row in the table or trying get to a value of 250 for each instance. But here are 2 formulas, one for each. I added aggregation functions to the premium comparison.
count(distinct {<REASON={'CUSTOMER REQUEST'},CLASS_CODE={'MC','M4'},PREMIUM ={"=sum(PREMIUM)>sum(CR_PREMIUM)" }>} 1) * 250
sum({<REASON={'CUSTOMER REQUEST'},CLASS_CODE={'MC','M4'},PREMIUM ={"=sum(PREMIUM)>sum(CR_PREMIUM)" }>} 250)
Here, Premium should be > CR_Premium
Hi Dear please help me on this!
Neville
try this may be
Make sure your Fields are spelled correctly
SUM({<REASON={"CUSTOMER REQUEST"},CLASS_CODE={'MC','M4'},PREMIUM ={"=(PREMIUM>CR_PREMIUM)" }>}250)
Hi Pradosh
That too doesn't help me to get the results. Could you please look in to this again
Regards
Neville
What is 250 in your sum() is that Field name?
May be Try below:
= SUM({< REASON={'CUSTOMER REQUEST'},
CLASS_CODE={'MC','M4'},
PREMIUM = {'>CR_PREMIUM'} >} 250)
Hi Neville
as Viswarath rightly asked what is 250 ? are you sure your field value are in upper case? I mean case sensitivity might be giving you wrong results.
regards
Pradosh
Hi Vishwarath, Pradosh,
Even the expression proposed by Vishwarath doesn't work. Rs 250 is not a field, If the said conditions are met Rs 250 for such policies to be charged with. That is my requirement. If you propose some other expression or something to be done in the script to get the out put that will be alright.
Please see to this & help me
Regds
Neville
I am unable to open your qvw file. Can you post your script here so that i can just load the files. Please post the actual expression too rather than 250 in your sum expression.
Hi Vishwarath,
Please refer below
REFUNDS:
LOAD BRANCH, CLASS_CODE, PRODUCT_CODE, POLICY_NO, NAME_OF_INSURED, CREDIT_NOTE_NO,
CREDIT_NOTE_DATE, PERIOD_FROM, PERIOD_TO, PREMIUM, ADDRES, REASON, FINANCIAL_INTEREST,
ME_CODE, ME_NAME
FROM
REFUNDS_GL:
LOAD REASON, CREDIT_NOTE_NO, DATE, CR_PREMIUM
FROM
"expressions"
SUM(PREMIUM)
SUM(CR_PREMIUM)
SUM({<REASON={'CUSTOMER REQUEST'},CLASS_CODE={'MC','M4'},PREMIUM ={"=PREMIUM>CR_PREMIUM" }>}250)