Filter more than one value in a derived collection

I have the following collection that filters on the city amsterdam

'Data Municipality Amsterdam end date reached link': collection ['id'] = ^ ^ .'UWV Database upload'.'Raw Data'* .'city'?'Amsterdam'

Now I would like to also filter a second value like so

'Data Municipality Amsterdam end date reached link': collection ['id'] = ^ ^ .'UWV Database upload'.'Raw Data'* .'city'?'Amsterdam' and .'End date reached'?'Yes'

How can I go about doing this?

Hi Ebbe,

Currently, the way to go is to derive the second stategroup under the right state (so derive ‘End date reached’ under ‘Amsterdam’) and then add the second filtering under the first one, so:

‘Data Municipality Amsterdam end date reached link’: collection [‘id’] = ^ ^ .‘UWV Database upload’.‘Raw Data’* .‘city’?‘Amsterdam’ .‘End date reached’?‘Yes’

Hi,

Thanks for the response I tried this but it does not find the value in the attributes. I get the following error:

 'property' `End date reached` was not found in 'attributes'. None exist.
		defined by .'UWV Database upload'.'Raw Data'.'city'.'Amsterdam' of type 'application'!'node'

The entire collection is structured like so:

'Data Municipality Amsterdam only UB40 link': collection ['id'] = ^ ^ .'UWV Database upload'.'Raw Data'* .'city'?'Amsterdam' .'End date reached'?'Yes' { //how to go about filtering another value after this
				can-read: user .'Type'?'Municipality of Amsterdam'

				'id': text -> ^ ^ ^ .'UWV Database upload'.'Raw Data'[] .'city'?'Amsterdam' .'End date reached'?'Yes' = key
				'city': text = >'id' ^ .'SSN'
				'First name': text = >'id' ^ .'First name'
				'Last name': text = >'id' ^ .'Last name'
				'type': stategroup = switch >'id' ^ .'type' (
					|'UB40' => 'UB40' ( )
					|'DIS'  => 'DIS' ( )
					|'TILL' => 'TILL' ( )
					|'NULL' => 'NULL' ( )
				) (
					'UB40' { }
					'DIS' { }
					'TILL' { }
					'NULL' { }
				)
			}

This results in the above error

Hi Ebbe,

You will have to have the stategroup (derived) under the ‘Amsterdam’ state in your raw data. Actually, we often come to the conclusion that not deriving it there, but actually placing it there it the best solution. :slight_smile: