Table 1 (Combined Hours) I have a list of [payweek], which is many repeated
Table 2 (All Scripts), I have a list of jobs and two dates, [Scripting Date] and [R4PreScriptDate]
I am trying to find the number of unique [payweek]s between the [Scripting Date] and the [R4PreScriptDate]
The DAX formula is below. My result is always 3. However, I am expecting variable answers (0,1, 2,3,4 or 5)
R4PreScriptWkCt = CALCULATE(DISTINCTCOUNTNOBLANK(CombinedHours[payWeek]),FILTER(CombinedHours, CombinedHours[payWeek] <= MAX (AllScripts[Scripting Date] ) && CombinedHours[payWeek] >= MAX (AllScripts[R4PreScriptDate] ) ))
Thank you,