The use case is that I have a form where a user will choose red, blue, or green in the โCOLOR SELECTION FIELDโ.
I have a field (as shown below) that will return all columns from another table when that selection above is found in the โCOLORSโ column for that other table.
FILTER(โTABLEโ, ([COLOR SELECTION] = [COLORS] ))
What I want is FILTER ROWS WHERE COLOR SELECTION IS CONTAINED WITHIN COLORS and also to choose the columns if possible.
The COLORS field is not an exact match to COLOR SELECTIONโฆmore like tags where it can have yellow, green, blue (comma separated). I want all COLORS column values where COLOR SELECTION = โBlueโ for example, whether exact match or if โBlueโ is simply found in the COLORS value ( yellow, green, blue for example).
Solved! Go to Solution.
Hi @Sam87
What about:
FILTER(โTABLEโ,
CONTAINS([COLORS], [_THISROW].[COLOR SELECTION])
)
For reference:
Hi @Sam87
What about:
FILTER(โTABLEโ,
CONTAINS([COLORS], [_THISROW].[COLOR SELECTION])
)
For reference:
Thanks,
I used this and it works great!
FILTER(โTABLEโ,
CONTAINS([COLORS], [_THISROW].[COLOR SELECTION])
)
I decided to just return one column from the lookup table based on the contains.
I used SELECT(COLORSTABLE[RETURN COLUMN], CONTAINS([COLORS], [_THISROW].[COLOR SELECTION])
)
For some reason the whole table is being returned (with the proper contains result) rather than just the return column. Any thoughts?
You may want to share a screenshot in order to help us better understand what you describe, as well as a screenshot of your table structure.
If the data being searched is a simple textual value, CONTAINS()
is the correct choice.
I am good with this, works. It works great now with containsโฆbut my alternate formula to just pull one column from the table on the match isnโt working. It returns all columns:
SELECT(COLORSTABLE[RETURN COLUMN], CONTAINS([COLORS], [_THISROW].[COLOR SELECTION])
)
The good row but all the columns ? ==> that makes me think:
Can you provide screenshot in order to confirm/deny this ?
This returns all columns rather than just the โReason for PR Failureโ column
SELECT(SystemFix[Reason for Failure], CONTAINS([Tags],[Field of concern]))
Note: This expression could impact performance.
The list of values of column โReason for PR Failureโ
โฆfrom rows of table โSystemFixโ
โฆwhere this condition is true: ((The value of column โTagsโ) contains the text value (The value of column โField of concernโ))
I was interested in a screenshot of the output too, sorry for not having been clear.
I think you donโt display every necessary information, as the SELECT expression in your last post is not visible in the screenshot provided.
Also, a SELECT returns a list. a Text type is not appropriate, you might want to change it to a List type.
User | Count |
---|---|
15 | |
11 | |
11 | |
8 | |
3 |