Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Seeking Help

Status
Not open for further replies.

plainsman

Technical User
Feb 18, 2005
3
US
Thanks in advance for any assistance. I'm trying to learn but this one's got me.

Here's what I have:
Curdat these are my date and are labeled M_01, M_02, etx
Reprice_Freq_Mult = Either M (month) or D (Day)
Reprice_Freq = a number

I need an expression where

if curdat=M_01 and Reprice_Freq_Mult='D' then Reprice_Freq but Reprice_Freq_Mult='M' then Reprice_Freq*30

This is what I have so far but I'm not sure where to put the curdat. I'm not even sure if this works because I know it's not what I need so I haven't run it yet. X_01: Sum(IIf([reprice_freq_mult]='D',[Reprice_freq],0)) Or Sum(IIf([reprice_freq_mult]='M',[Reprice_Freq]*30,0))
 
Something like this ?
X_01: Sum(IIf([Curdat]='M_01', [Reprice_Freq]*IIf([Reprice_Freq_Mult]='M',30,1)), 0)

To be honest I don't understand this:
Curdat these are my date and are labeled M_01, M_02,

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Basically M_01, M_02, M_03 are my heading for my dates because I had to reformat them into a MMYYYY (012004, 022004, etc.)

Below is code I have for a different column that works
B_01: Sum(IIf([currdt]=[M_01],[AMOUNT_PARTICIP],0))
This is straight and simple. It goes out to my database finds M_01 and brings back my balance for that month.

In my request I need it to look at the date M_01" and Reprice_Freq_Mult. If the Reprice_Freq_Mult is equal to "D" I can pull back the Reprice_Freq. If the Reprice_Freq_Mult is equal to "M", I need to multiply the Reprice_Freq by 30 days.

Thanks again
 
I think I'm going to drop this for now and go about it a different way thanks again.
 
What about this ?
X_01: Sum(IIf([Curdat]=[M_01], [Reprice_Freq]*IIf([Reprice_Freq_Mult]='M',30,1)), 0)


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top