Thanks for your reply
I tried this option but data is not displaying in the chart.
I have Week as one of the dimension and if I use the above expression will it show only 5 weeks
I need to export this chart to excel and send as attachment in mail.
So whether we can restrict the chart to have latest 5 weeks data (as this chart is not visible to users and it is for only mail purposes) and trigger a mail on the scheduled time.
In "activate sheet" trigger I have added the below expression for "select in field" trigger
Create 2 variables "From" & "To"
set From = num(Max(Date.Date))-35;
set To = num(Max(Date.Date));
='>=' & Date(From, 'YYYY-MM-DD') & '<=' & Date(To, 'YYYY-MM-DD')
The Date format need to be changed based on your date field format.