Formula

Hello,

Can anyone give me the formula for this filter, so I can use it in reports.
Print attachment.

GratefulFiltro.pngEsseFiltro.png

Solved Solved
0 12 276
1 ACCEPTED SOLUTION

Solved with the formula:
FILTER(
"animals",
AND(
OR([Location] = [_THISROW].[Location], [_THISROW].[Location] = "All"),
OR([Race] = [_THISROW].[Race], [_THISROW].[Race] = "All"),
OR([Sex] = [_THISROW].[Sex], [_THISROW].[Sex] = "All"),
OR([Type] = [_THISROW].[Type], [_THISROW].[Type] = "All"),
OR([Origin] = [_THISROW].[Origin], [_THISROW].[Origin] = "All"),
OR([Status] = [_THISROW].[Status], [_THISROW].[Status] = "All") )
)

View solution in original post

12 REPLIES 12

It sounds you are looking for something like..
Start: SELECT(Estoque Animals[Codigo],AND([Local]="Veneza",[Sexo]="Femea",[Status]="Ativo"))

Hi @Aleksi Alkio
Thank you for your attention, but the columns "Sex", "Status" and others are an ENUM("All","Male","Female",...), that is, when it is "All" this filter does not have It is made.

 

Is it possible to know the formula for this filter?

Filtro.png

To have an idea what you are looking for, you need to give more details what you are trying to do. 

I need a filter like it is in the attached print.

There are lot of different ways to filter the data, and then the solution is different depending on your goal. That's why you need to explain with details how do you want to do it.

I have a table with 5 columns:
Race, Sex, Type, Origin, Status
I need to select records from another table as reported in each column.
Each column has several options and I must select one, Ex:
Race = All, Nelore, Mixed race
Sex = All,Male,Female

After this selection, the app must filter the table according to the selection.

If you need more details, just ask,
Grateful

The "Selection" table has only one row?

Various lines

 

Which line it should use for the filtering?

all lines may contain the desired selection.
Sorry if I didn't understand your question.

This is the table in which the filter will be created according to the selection. With option for ALL lines.

Screenshot 2024-01-05 12.20.20.png

Solved with the formula:
FILTER(
"animals",
AND(
OR([Location] = [_THISROW].[Location], [_THISROW].[Location] = "All"),
OR([Race] = [_THISROW].[Race], [_THISROW].[Race] = "All"),
OR([Sex] = [_THISROW].[Sex], [_THISROW].[Sex] = "All"),
OR([Type] = [_THISROW].[Type], [_THISROW].[Type] = "All"),
OR([Origin] = [_THISROW].[Origin], [_THISROW].[Origin] = "All"),
OR([Status] = [_THISROW].[Status], [_THISROW].[Status] = "All") )
)

Top Labels in this Space