Hello,
In a query I have 3 seperate columns outputting information based on 3 seperate built expressions. They each are outputting the invoice amount by the date they were due. One is doing invoice amounts from 31-90 days over due, one is doing 91-180 days over due, and the other is doing over 180 days over due.
The code looks as such:
31-90 days over:
Highest 31-90: Sum(IIf([NET_DUE_DATE] Between Date()-31 And Date()-90,([G/L Principl Amt])*0.25,0))
91-180 days over:
Highest 91-180: Sum(IIf([NET_DUE_DATE] Between Date()-91 And Date()-180,([G/L Principl Amt])*0.5,0))
Over 180 days over:
Highest Over 180: Sum(IIf([NET_DUE_DATE]<=Date()-180,([G/L Principl Amt])*1,0))
I want to be able to display all the values, like I am with the original three seperate columns, just in one column and then just to be able to click the sort desceding button to give me the highest values.
For example, I just want to be able to put all three of the strings together like this, I just don't know the correct syntax to do this:
Highest: Sum(IIf([NET_DUE_DATE] Between Date()-31 And Date()-90,([G/L Principl Amt])*0.25,0)), Sum(IIf([NET_DUE_DATE] Between Date()-91 And Date()-180,([G/L Principl Amt])*0.5,0)), Sum(IIf([NET_DUE_DATE]<=Date()-180,([G/L Principl Amt])*1,0))
What would be the correct syntax to do this?
Thank you
In a query I have 3 seperate columns outputting information based on 3 seperate built expressions. They each are outputting the invoice amount by the date they were due. One is doing invoice amounts from 31-90 days over due, one is doing 91-180 days over due, and the other is doing over 180 days over due.
The code looks as such:
31-90 days over:
Highest 31-90: Sum(IIf([NET_DUE_DATE] Between Date()-31 And Date()-90,([G/L Principl Amt])*0.25,0))
91-180 days over:
Highest 91-180: Sum(IIf([NET_DUE_DATE] Between Date()-91 And Date()-180,([G/L Principl Amt])*0.5,0))
Over 180 days over:
Highest Over 180: Sum(IIf([NET_DUE_DATE]<=Date()-180,([G/L Principl Amt])*1,0))
I want to be able to display all the values, like I am with the original three seperate columns, just in one column and then just to be able to click the sort desceding button to give me the highest values.
For example, I just want to be able to put all three of the strings together like this, I just don't know the correct syntax to do this:
Highest: Sum(IIf([NET_DUE_DATE] Between Date()-31 And Date()-90,([G/L Principl Amt])*0.25,0)), Sum(IIf([NET_DUE_DATE] Between Date()-91 And Date()-180,([G/L Principl Amt])*0.5,0)), Sum(IIf([NET_DUE_DATE]<=Date()-180,([G/L Principl Amt])*1,0))
What would be the correct syntax to do this?
Thank you