You have to use the Table Calculation filter instead of Normal Dimension Filter.
Change Month to Year, Quarter as required.
Hi Shashank Kumar,
These is because the table calculation is the penult one being calculated.
And it's based on the canvas. If you filter data, the canvas change, so does the table calculation.
Check out this link :Tableau's Order of Operations - Tableau .
If you can share a workbook or screenshoot i can provide exact formula for you.
Thanks for the explanation. The above formula works.