i have a table with 2 columns, "company name"(EnumList) & "Company Key"(text), the user selects "company name" and then "company key" is filled out automatically and the user can't edit it.
--------------------
when both company name and company key was set to "TEXT" it worked using this formula
SELECT(Company table[Company Key], ([Company Name] = [_THISROW].[Company Name]))
-------------------
I wanted to be able to select multiple "company names" have them separated by a comma, and it still pulls the "company key" and list with a comma.
i get 2 errors , one on expression assistant
Use IN() instead.
would it require doing
IN([Company Name], LIST(Company table[Company Name], Company table[Company Key]))
then a IF() function to return the company key if true?
I'm able to get the EnumList of company names to list properly with a comma between them
ex:
"Company 01,Company 07,Company 09", now I just need it to auto fill the company key for each with commas too
No. You should always deal with "Company key" in your expressions and saved values. At the same time, setting "Company Name" as your Label column, will have it shown in all your views.
For example, you have an EnumList to select companies. The values of this EnumList should be the values of the "Company Key" table, but the display will show you the corresponding values of the "Company Name" column.
See this:
This expression seems to have worked
SELECT(
Company table[Company Key],
IN([Company Name], [_THISROW].[Company Name])
)
User | Count |
---|---|
14 | |
11 | |
9 | |
7 | |
4 |