Hi,
First capture the end date value in variable with user response function.
Like X=userresponse("end date")
Create one more variable like Y=relativedate([X];-30)
This variable gives you the 30 days back date based on the user select end date.
Then use X and Y variable in the where clause to get the 30 days data.
Amit