In my data I have year, department and price. I want the user to select a year and display only the lowest price within a given department. Then I want to calculate the difference between the minimum price for the selected year and the prior year.

The problem I am having is the difference won’t calculate correctly based on the current and previous year. I have tried to create table calculations by going on specific dimensions and picking year but I keep getting the wrong calculations.