Forum Discussion
Conditions Query for Todays Date - 30 days Help Request
I'm currently trying to figure out if it's possible to update a Conditions field to allow for Todays Date 30 days.
I'm currently Querying from an API in our Ticketing System with an addition condition that will get all the tickets from the beginning of the year.
Now this does take a while which is fine but I want to find a way to only get the last 30 days without having to update the query every Month.
Does anyone have an idea how?
Currently I have it like this:
conditions = "dateEntered>=[2024-01-01T07:00:00Z]",
- Anonymous2 years ago
lbendlin Thanks for the quick reply.I may have a different thought process.
Hi TechWolf ,
Regarding your question, you can refer to the following dax expression to realize it.
1. Use the following DAX expression to create a measure named ‘Last30Days’:Last30Days = VAR Today = TODAY() VAR StartDate = Today – 30 RETURN FILTER (‘TableName’,[dateEnterned] >= StartDate && [dateEnterned] <= Today)With this expression you can dynamically filter data up to 30 days old.
2 Replies
- lbendlin
Super User
I don't think that's the right format, but you can use something like
DateTimeZone.UtcNow()-#duration(30,0,0,0)
- AnonymousNot applicable
lbendlin Thanks for the quick reply.I may have a different thought process.
Hi TechWolf ,
Regarding your question, you can refer to the following dax expression to realize it.
1. Use the following DAX expression to create a measure named ‘Last30Days’:Last30Days = VAR Today = TODAY() VAR StartDate = Today – 30 RETURN FILTER (‘TableName’,[dateEnterned] >= StartDate && [dateEnterned] <= Today)With this expression you can dynamically filter data up to 30 days old.