Show if Valif IF

Hello there!

I have a table, where I need to create a smart filter (Valid If and Show If) in several columns, with a specific initial value (โ€œMes completoโ€) this value will be added or take it away if the sum of the values (numeric) of certain columns are equal to IF(AND([Preg6]=โ€œSโ€,[Preg7]=โ€œSโ€,[Preg8]=โ€œSโ€,[Preg9]=โ€œSโ€,[Preg10]=โ€œSโ€),โ€œMes completoโ€,true). This expression is repited in several columns regarding the values of other columns. What I need is only allowed 1 value (โ€œMes completoโ€) in the hole form, and is this value can be repited in other columns show an error or not allow to save the form, beacause it must be only 1 (โ€œMes completoโ€).

I create a virtual column that controls the text values โ€‹โ€‹(โ€œMes completoโ€) of all the table and converted them into a number 1, so if there is any more than 1 (โ€œMes completoโ€) must shows an error in the columns where the value text is equal to (โ€œMes completoโ€).
[Mes_completo_notblank_expression]:
IFS(
[Un mes2]=โ€œMes completoโ€,1,
[Dos meses2]=โ€œMes completoโ€,1,
[Tres meses2]=โ€œMes completoโ€,1,
[Cuatro meses2]=โ€œMes completoโ€,1,
[Cinco meses2]=โ€œMes completoโ€,1,
[Seis meses2]=โ€œMes completoโ€,1,
[Siete meses2]=โ€œMes completoโ€,1,
[Ocho meses2]=โ€œMes completoโ€,1,
[Nueve meses2]=โ€œMes completoโ€,1,
[Diez meses2]=โ€œMes completoโ€,1,
[Doce meses2]=โ€œMes completoโ€,1,
[Quince meses2]=โ€œMes completoโ€,1,
[Dieciocho meses2]=โ€œMes completoโ€,1,
[Veintiรบn meses2]=โ€œMes completoโ€,1,
[Veinticuatro meses2]=โ€œMes completoโ€,1,
,true,0)

Then I create a second virtual column that SUMยดs the number values of the expresion:
[Mes_completo_count]: SUM([Mes_completo_notblank_expression]) this is not summing [Mes_completo_notblank_expression]

And the filter condition in the columns that must enter or take away automaticaly the text value (โ€œMes completoโ€) has this expression:
Valid if: [Mes_completo_count]<2
Show if: [Mes_completo_count]<2

But all of this is not working, beacause SUM([Mes_completo_notblank_expression]) is not summing

Any ideas?

0 6 405
6 REPLIES 6

I am not clear on where the IFS() statement is being used.

It seems you are using it to compute the value of [Mes_completo_notblank_expression]. But in an IFS(), ONE AND ONLY ONE condition will be executed. This means [Mes_completo_notblank_expression] will be either 1 or 0. And performing a SUM on it will only ever return 1 or 0.

What am I missing?

Ok, I think I now understand what you were expecting from the IFS(). The statement doesnโ€™t work like you are thinking.

Instead what you probably want to do is create an App formula in [Mes_completo_count] that is something like:

IF([Un mes2]=โ€œMes completoโ€,1,0)

  • IF([Dos meses2]=โ€œMes completoโ€,1,0)
  • IF([Tres meses2]=โ€œMes completoโ€,1,0)
    โ€ฆ
  • IF([Veinticuatro meses2]=โ€œMes completoโ€,1,0)

You donโ€™t need the SUM and if [Mes_completo_notblank_expression] is only used for the calculation then you can get rid of it as well.

Ok, and how I can tell the App if there is more than 1 โ€œMes completoโ€ show me an error?

SUM(
  LIST(
    IFS(("Mes completo" = [Un mes2]), 1),
    IFS(("Mes completo" = [Dos meses2]), 1),
    IFS(("Mes completo" = [Tres meses2]), 1),
    IFS(("Mes completo" = [Cuatro meses2]), 1),
    IFS(("Mes completo" = [Cinco meses2]), 1),
    IFS(("Mes completo" = [Seis meses2]), 1),
    IFS(("Mes completo" = [Siete meses2]), 1),
    IFS(("Mes completo" = [Ocho meses2]), 1),
    IFS(("Mes completo" = [Nueve meses2]), 1),
    IFS(("Mes completo" = [Diez meses2]), 1),
    IFS(("Mes completo" = [Doce meses2]), 1),
    IFS(("Mes completo" = [Quince meses2]), 1),
    IFS(("Mes completo" = [Dieciocho meses2]), 1),
    IFS(("Mes completo" = [Veintiรบn meses2]), 1),
    IFS(("Mes completo" = [Veinticuatro meses2]), 1)
  )
)

First, I just realized that in the previous post the bullet points should have been โ€œ+โ€ (not sure how to escape the plus sign). It is a series of IF() statements all added together.

IF([Un mes2]=โ€œMes completoโ€,1,0)
โ€˜+โ€™ IF([Dos meses2]=โ€œMes completoโ€,1,0)
โ€˜+โ€™ IF([Tres meses2]=โ€œMes completoโ€,1,0)
โ€ฆ
โ€˜+โ€™ IF([Veinticuatro meses2]=โ€œMes completoโ€,1,0)

@Steve just posted a valid alternative as well

You can still inspect this count in the Valid_If section of any column where you want the message to show as you had suggested.

Enclose short code snippets in single backticks (`):

`a short snippet`

Enclose multi-line snippets between single lines containing only three backticks (```).

```
multi-line
code snippet
here
```
Top Labels in this Space