Forum Discussion
aghonaim
8 years agoMost Valuable Professional
DAX Formula
Can someone help me with a simple formula to calcualte the value of the last year (which is YYYY number not a full date) ? I tried the following formual but it isn't returning any values: LY = Calc...
aghonaim
8 years agoMost Valuable Professional
Thanks a lot! it worked but the LY total is not correct:
Can the totoal be fixed ?
SivaMani
8 years agoResident Rockstar
The total is showing LY value of 2012. Because you have used MAX in your DAX. so, it picks Max(Year).
Just Create a calculated measure with following formula,
Last Year = LOOKUPVALUE(Table3[Value],Table3[Year],Table3[Year]-1)
you will get the required Value.
Thanks,
Siva
- aghonaim8 years agoMost Valuable Professional
I got this error:
A single value for column 'Year' in table 'Table' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.