DAX measure - Last Year measure that only shows values until today's date
I want to be able to compare Revenue TY (this year) with Revenue LY (last year). I want to be able to compare these measures both on a day, month and a year level. Thus, I do not want to show any future values for last year, even though these actually exist. As shown below I do want to get ride of the red numbers, and I want to ensure the the sum is correct in the yellow marked fields.
In the below picture todays date is 27-11-2017 (and we did not have any sales 27-11-2016, thus no values is shown for LY)
Can somebody help?
I have tried with some complex dax, but I figured out it dont work as intended. Thus I have started again with the simple calculation;
@linekrogh- I have tweeked the calculation a bit. First of all as I said in the previous post, you need to use the column used as you year column in your hierarki in the HASONEVALUE function and not your year column. Secondly there is an issues with using SAMEPERIODLAST year, because on the year total it will return the full value on last year and not last year until today - please try the following syntax: