Forum Discussion
Page-Level Filter NOW() - 1
- 10 years ago
Nikil (& Idanco) are correct in that you can't just filter by NOW() - 1. The model doesn't know how NOW()-1 is related to TicketCompletionDate.
Nikil's first option (don't bring in the more recent tickets) works if you don't have other reports where you do want to include those tickets. Assuming you do, you have to go for a (calculated) column that you can dynamically filter on.
If you have a date table in your model, you could actually add a calculated column to that table to identify whether the date is before today or not. E.g. =if([Date]>=NOW()-1,"N", "Y"). That makes the "before today" filter available to anything that uses dates in your model, rather than just being limited to tickets. With a date table you can also get more sophisticated and have Y/N columns for MTD, YTD, Last Month, etc.
If you don't have a date table, =if([TicketCompletionDate]>=NOW()-1,"N","Y") will do the same thing, but just for ticket completions.
Nikil (& Idanco) are correct in that you can't just filter by NOW() - 1. The model doesn't know how NOW()-1 is related to TicketCompletionDate.
Nikil's first option (don't bring in the more recent tickets) works if you don't have other reports where you do want to include those tickets. Assuming you do, you have to go for a (calculated) column that you can dynamically filter on.
If you have a date table in your model, you could actually add a calculated column to that table to identify whether the date is before today or not. E.g. =if([Date]>=NOW()-1,"N", "Y"). That makes the "before today" filter available to anything that uses dates in your model, rather than just being limited to tickets. With a date table you can also get more sophisticated and have Y/N columns for MTD, YTD, Last Month, etc.
If you don't have a date table, =if([TicketCompletionDate]>=NOW()-1,"N","Y") will do the same thing, but just for ticket completions.