IIfmultiple conditions

aattas

Registered User.
Local time
Today, 12:56
Joined
Dec 24, 2014
Messages
75
Experts,
need help here.

I tried to do a multilple IIF, but the results always come out on the first one, how can i tie the conditions and each should act accordingly. Here is the code.

=IIf([First of Codecat]=1,[AccessTotalsmuamaladate_By_Month]*0.25,[calculate]), IIf([First of Codecat]=2,[AccessTotalsmuamaladate_By_Month]*1,[calculate]),IIf([First of Codecat]=3,[AccessTotalsmuamaladate_By_Month]*2,[calculate])

System only recognize the first condition. Appreciate your help and thankyou in advance.
 
Firstly check out the docs here.


From the docs here is a sample nested iif statement.
Code:
=IIf([CountryRegion]="Italy", "Italian", IIf([CountryRegion]="France",  "French", IIf([CountryRegion]="Germany", "German", "Some other  language")))
You'll note the nested iff's are a part of the false conditions, whereas your sample it's not.


Does that clear it up.
 
Move the two right brackets ) from the middle of your expression to the end
 
Experts,

I have solved my problem,

With this
=IIf([First of Codecat]=2,[AccessTotalsmuamaladate_By_Month]*1,IIf([First of Codecat]=1,[AccessTotalsmuamaladate_By_Month]*0.25,IIf([First of Codecat]=3,[AccessTotalsmuamaladate_By_Month]*2)))
 
Experts,

I have solved my problem,

With this
=IIf([First of Codecat]=2,[AccessTotalsmuamaladate_By_Month]*1,IIf([First of Codecat]=1,[AccessTotalsmuamaladate_By_Month]*0.25,IIf([First of Codecat]=3,[AccessTotalsmuamaladate_By_Month]*2)))


Glad you got it sorted, but I am not an expert.
 
Experts,
I tried to do a multilple IIF, but the results always come out on the first one, how can i tie the conditions and each should act accordingly. Here is the code.
I noted that you solved the problem already. Still I'd like to mention my video on the Iif and Switch functions which covers that topic and might show an alternative to the nested Iif-statements.
 

Users who are viewing this thread

Back
Top Bottom