I have created a Valid IF, that IF a dropdown is selected from [Phase Code] it will SELECT(Gissing Allocated Hours and match the items that match the ENUM
SELECT(Gissing Allocated Hours[Description], ([Descriptive Code] = [_THIS].[Phase Code], TRUE))
However, I am looking at adding a second condition. A button where they have to select the [Section] i.e building and it would create an additional filter on the Phase Description based on the building.
Table Source: Gissing Allocated Hours
Add On From Table Soruce : [Section]
Selection from the Form [Building]
Wanting [Section] =[ Building] for the statement to be true on top of the current Valid IF Statement.
do you mind sharing how to add it onto the current formula with using the AND() because I keep getting an error. would it be before or after the closed brackets?
SELECT(Gissing Allocated Hours[Description], ([Descriptive Code] = [_THIS].[Phase Code], TRUE))
The articles included above should show you the correct syntax.
The format would be something like this (using your example to start with):
SELECT(Gissing Allocated Hours[Description],
AND(
[Descriptive Code] = [_THIS].[Phase Code],
<<logical test 2>>,
<<logical test 3>>,
...
<<logical test n>>,
)
)
I hope this helps!
2 Likes
Thanks for the response! i think i am super close now. Just still some formatting changes.
SELECT(Gissing Allocated Hours[Description],AND([Descriptive Code] = [_THIS].[Phase Code], TRUE),([Section] = [_THIS].[Building],TRUE))
I am not getting an error message and its valid however the second logic test isn’t working. Any ideas?
Thanks,
Brendan
You do not need the TRUE values and your parentheses are not correctly placed. The expression should be implemented like this:
SELECT(Gissing Allocated Hours[Description],
AND([Descriptive Code] = [_THIS].[Phase Code],
[Section] = [_THIS].[Building]
)
)
I formatted it like this just so you can see how things match up.
Based on your original post, I am not certain if you mean to take advantage of the third OPTIONAL parameter Distinct_Only? This means the function will ignore any duplicate returned value and provide a list of only unique values. If you need that as well then the implementation would look like this:
SELECT(Gissing Allocated Hours[Description],
AND([Descriptive Code] = [_THIS].[Phase Code],
[Section] = [_THIS].[Building]
),
TRUE
)
1 Like