'I'm trying to create year parameter in tableau to filter data by year. The results are not getting reflected

I've created a parameter with values 1970-2013 range and have then created calculated field with the below code

[Year] = [parameter year]



Solution 1:[1]

If you only want to filter by year, then you don’t need a parameter or a calculated field. Just put the Year field on the filter shelf and show the filter control.

A parameter is useful in other circumstances, say if you want to treat one year differently, but keep all years in the viz

Solution 2:[2]

In Calculation field don't use " = "sign, just type parameter name only and click 'OK'.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Alex Blakemore
Solution 2 soniabhishek36