IFS function is used incorrectly:Inputs to IFS() must be condition-value pairs.

Hello, 

I have two tables with the keys (Keys_VIP and Keys_Standart).

Keys can be for android and iphone deveses. I made slices for each:

 Keys_standart_android_free, Keys_standart_iphone_free, Keys_VIP_android_free, Keys_VIP_iphone_free

Keys in both tables are unique. 

I have main table where i want to to select type of key (VIP/Standart) and device (Android/Iphone)

So i put the following formula to Valid If but recive a following error:

 

IFS(

[Key Type]="Stadart",

IF([Device]="Android",

 Keys_standart_android_free[Key Number],

 Keys_standart_iphone_free[Key Number]),

 

[Key Type]="VIP",

IF([Device]="Android",

 Keys_VIP_android_free[Key Number],

 Keys_VIP_iphone_free[Key Number])

)

IFS function is used incorrectly:Inputs to IFS() must be condition-value pairs. Input 4 is not a value of a consistent type.

I also tried SWITCH() and IFS() with every conditional but resault is the same. 

Error is solved when i put away one of the table (Keys_VIP /Keys_Standart) from formula, but i need to keep both.

0 6 183
6 REPLIES 6

IF(
[Key type]="Standart",

IF([Device]="Android",
Keys_standart_android_free[Key number],
Keys_standart_iphone_free[Key number]),

IF([Device]="Android",
Keys_VIP_android_free[Key number],
Keys_VIP_iphone_free[Key number])
)

 

With only IF()  functions it works, but can't get why is it wrong with IFS()

Hi @AleksanderM ,

Did you find solution to your issue? I'm facing the similar situation and struggling to find solution.

If the column types are not identical, it could be one reason why it doesn't work.

All columns are text-type

No( Left the IF() function.  

The results of your IFS statements seem to be returning a list of values?  But you said you put the formula in the Valid_If section?  The formulas in Valid_If have to return a TRUE or FALSE value for the IF expression.

Or have I misread this?

Edit: I did misread this so here is another suggestion to keep the IFS statement

IFS(
AND([Key Type]="Stadart",[Device]="Android"),Keys_standart_android_free[Key Number],
AND([Key Type]="Stadart",[Device]="iPhone"),Keys_standart_iphone_free[Key Number],
AND([Key Type]="VIP",[Device]="Android"),Keys_VIP_android_free[Key Number],
AND([Key Type]="VIP",[Device]="iPhone"),Keys_VIP_iphone_free[Key Number]
)
Top Labels in this Space