Hello experts,
My source data is somewhat as following
BUYearGLAmount12016511200100120175112002001201851120030012019511200400120195223001000220164110011000002201741100141000022018411001500002201941100287421
What I want tableau to do is to be able to generate last 2 year's corresponding value in respect to the selected Year value in filter.
For example, when user selects Year=2018
For example, when user selects Year=2019
This is currently doable in Power BI. Is tableau capable of returning the same view?
4 answers
Sure. You can build a view like this for starters.
Then create a parameter like this:
Then a calculated field:
Keep Year
// Want to keep current year (based on parameter) and previous 2.
IF [Year]>=[Year Selected]-2 and [Year]<=[Year Selected] THEN
"Include"
ELSE
"Exclude"
END
Then filter on that value, only keeping "Include" values.
See attached.