nested iif with Sum

jedder18

Just Livin the Dream!
Local time
Today, 00:38
Joined
Mar 28, 2012
Messages
135
=Sum(IIf([Date]<#7/1/2019#,IIf([GrpIndiv]="Individual",([Hours])*50.23,(IIf([GrpIndiv]="Individual",([Hours])*50.26)))))

THis only works for those meeting the 1st criteria...not if it's > 7/1

What am I missing?
I get no data at all for the 7/1 criteria.
 
maybe, if not individual, what then?

your expression can be easily read as:
Code:
=Sum(Switch([Date] < #7/1/2019# And [GrpIndiv] = "Individual", ([Hours]) * 50.23, [Date] >= #7/1/2019# And [GrpIndiv] = "Individual", ([Hours]) * 50.26), True, Null)
 
this should always be individual.
It's a separate formula from the group.
thanks for help
 
there is a portion there in the Switch that I posted:

…, True, 0)

meaning if it is not "Individual", regardless of date, then return 0.
replace 0 with your computation.
 
Great idea to put the indiv 1st.
I'm getting so confused between Access and Crystal, I getted bogged down in too many details.
This is great...thanks so much.
 

Users who are viewing this thread

Back
Top Bottom