Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am writing below codes to get an expression (each month balance/first month balance. Here denominator is always constant i.e. first yr balance however, numerartor will change on balance specific to each month
With Min Yr:
((Sum({1<yymm = {'$(=Min(yymm))'}>} ((OPEN_BAL_AMT)))+Sum({1<yymm = {'$(=Min(yymm))'}>} ((CLOSE_BAL_AMT))))/2)
This code gives first month balance.
All Yrs:
(sum( {$<yymm = >} OPEN_BAL_AMT )+sum( {$<yymm = >} OPEN_BAL_AMT ))
This gives balance wrt to each month.
Now when I try to divide above two expressions, I am always getting first month balance and not other month balance.
Plz help.
Sunil
Hi!
I think you just need to add "Total" in first expression, then it will be not aggregated on months and it should work just fine:
((Sum( Total {1<yymm = {'$(=Min(yymm))'}>} ((OPEN_BAL_AMT)))+Sum(Total {1<yymm = {'$(=Min(yymm))'}>} ((CLOSE_BAL_AMT))))/2)
This does not work. Is there some other way to establish it?
I'm pretty sure it should work, take a look at attached qvw.