You are getting error in formula? or you are getting wrong output.
if error then you can make it as :
IF (isnull([Date Quit]) OR [Date Quit] > [Current Month End] ) AND ([Date Join] < [Current Month Start])
ElSEif [Date Quit] >= [Current Month Start] AND [Date Quit] <= [Current Month End]
2 of 2 people found this helpful
I think I have a better way to solve this instead of creating 12 measures for each month.
In your excel create a table in another sheet with start date and end date for each month(See the attached excel).
Then join this with your data source on 1=1 (using tableau's Calculation join feature. Check in attached twbx).
Then I have changed your formula a bit. Please see the attached workbook.
Your method magically works. Didn't realize that we need to create a new sheet for putting the measures of each month. Thank you for the help, Ankit.