Hi there,
I have a problem getting a function done. I have two tables, one table has my customers with a customer-id that is unique, the other tables holds contracts of customers with a reference value customer-id. The reference is working and so on.
The table contracts has a column called โcontracttypeโ of type enum with the values: Main, second, third.
Now I want to have a virtual column in my main table customer called โmain contractโ that gives me the name (other column in contract) of that contract.
My formula looks like this, but returns multiple values, I donโt know how i make that double selection.
SELECT(contract[contracttype], [customer_id] = [_THISROW].[customer_id]) <-- Now how i filter it by the term โMainโ.
I tried this:
SELECT(contract[contracttype], AND([customer_id] = [_THISROW].[customer_id]), contract[contracttype] = โMainโ) <-- But tells me Cannot compare List with Text.
Iโm happy for any help, thanks.
Solved! Go to Solution.
contract[contracttype]
is the List of all [contracttype]s within the table contract.
SELECT(
contract[contracttype],
AND(
[customer_id] = [_THISROW].[customer_id],
โMainโ = [contracttype]
)
)
contract[contracttype]
is the List of all [contracttype]s within the table contract.
SELECT(
contract[contracttype],
AND(
[customer_id] = [_THISROW].[customer_id],
โMainโ = [contracttype]
)
)
Amazing, thanks for the tipp, works like a charm
User | Count |
---|---|
37 | |
26 | |
23 | |
17 | |
14 |