How to Expressions

Hi, I would like to compare a specific value of a column with another value in another table. Can someone help me? For example: I have a Consultants table [Company name] and another table of sales [Company], I would like to know if the column Consultants [company name] value is equal to the value of the [Company] column, analyzing by lines for the time being I can check by list !
I am currently using the following expression: IN (Sales [Company], Sellers [Company Name]).

0 3 364
3 REPLIES 3

Steve
Platinum 4
Platinum 4

Your expression is close. Try this instead:

IN ([Company], Sellers [Company Name])

When you include both a table name and column name, as with Sales [Company], AppSheet replaces that with a list of all values from that column of that table. With the IN() function, the first argument should be a single value, not a list.

In the example I provided, Iโ€™ve replaced your column list reference with a column reference, [Company]. AppSheet will replace a column reference with value from that column in the current row.

Okay, but I want it if the result returns true when showing in a slice only the rows in which the [Company] value is the same as the [Company Name] sellers, this function I used, but checks to see if it contains the value in the list, if yes, show all data, even other lines that do not contain the value of the seller [Company name]

How does the app user select the company they want the slice limited to? A common method is to provide the user an option in user settings. The userโ€™s choice can then be referenced in an expressionโ€“such as the sliceโ€™s filter expressionโ€“to affect app behavior based on the userโ€™s setting.

Suppose you created a user setting called Company. You could reference that value in you slice filter expression as such:

IN (USERSETTINGS("Company"), Sellers [Company Name])

Top Labels in this Space