Unanswered: Query: selecting values based on criteria
I have a table where I keep data for multiple hotels where I hae the following rows
- country of origin
- nationality criteria - this field has only 2 options, "f" for foreign and "d" for domestic
- number of guests
- number of nightings
I made a query that returns all values based on year, month and object.
I want to single out all values in the [number of guests] and [number of nightings] that have the value "d" in the nationality criteria, and to have them sorted under same criteria as mentioned above (year,month,object etc.)
I used the following syntax: DLookUp("[guests]";"[guest_stat]";"[nationality_criteria] = 'd'").
As a result I get the same single value in all rows.
any other way of doing it, or am I doing something wrong?