Forum Discussion
MTD based on week number problems
- 6 years ago
Hello,
No it doesn't work ufortunately.
Hopefully i resolved my problems by myself Here is the solution if people have the same issue.
(1)calculate the first day of the week using the function "FIRSTDATE"
(2)Then you calcultate the last day of the week (1) + 6
(3) You use a if function to now if the month number of 1 and 2 are equal, if month are equal you can use the calculated lastday (2), if not you have to find the lastday of month (1) with this formula DATE(YEAR((1));MONTH((1)+1;1)-1.
Finally you calculate the expression and for the filter you take datesbetween( firstdate(1);Lastdate(3)
Hi ton-v ,
How about using FILTER() function and MonthNo to filter out specified month?
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello,
No it doesn't work ufortunately.
Hopefully i resolved my problems by myself Here is the solution if people have the same issue.
(1)calculate the first day of the week using the function "FIRSTDATE"
(2)Then you calcultate the last day of the week (1) + 6
(3) You use a if function to now if the month number of 1 and 2 are equal, if month are equal you can use the calculated lastday (2), if not you have to find the lastday of month (1) with this formula DATE(YEAR((1));MONTH((1)+1;1)-1.
Finally you calculate the expression and for the filter you take datesbetween( firstdate(1);Lastdate(3)