I have a query which has below fields
[Report Year] = [2012,2013,2014,2015,2016]
[Profit] = [Measure value]
[State] = [AZ, TX, etc..]
I also have [Report Month] = [1,2,3,4,5,6,7,8,9,10,11,12] which I can use in query if needed.
Input Prompt for user = [Report Year] = [2012,2013,2014,2015,2016] : User selects one or more years.
I am showing data in below cross tab format.
[2014] [2015] [2016]
____________________________
[State] | [Profit] [Profit] [Profit]
[State] | [Profit] [Profit] [Profit]
Issue - Profit for prior full years is fine but for the current year I want to show profit upto previous month.
So if the user runs the report today on 6/17/16 then the [2016] profit should be upto end of May so ignore June in profit calculation.
How do I achieve this?