So I mocked up a sample spreadsheet as I understand your data with an additional row (Ms Y) to show a date that is not in range. Here are my resulting tables…
If you try to add Dato from the first query to the table corresponding to the second query you will get something like this…
The key here is you need merge on the common object, Navn Arbejstager, in your case. To do so, click on it in the first query, Ctrl+click on it in the second query, right-click, and choose “Merge”.
Next you need to create a detail variable equal to Dato with Navn Arbejstager as the “Associated dimension”.
It is important that you choose the merged instances of Navn Arbejstager and not the instance from either query.
Now you can create a variable that checks if Dato is in range…
=If([Var Dato] Between ([elnd fraDato]; [elnd tilDato]); 1; 0)
There are more things to think about like what if a Navn Arbejstager is in one sheet, but not the other. Those scenarios can be dealt with, but I just wanted to stick to the basics since that may not be an issue for you.
I have referred to the following blog post numerous times when I have gotten stuck on something related to merging. Check it out.
Hope this helps,