Forum Discussion
Lucie_C
8 years agoFrequent Visitor
Value previous year
Hello, please, can you help me. I have simple data table and I need to add Calculated coloum Value previous year: Please, anyone does know DAX formula? Thank you
- 8 years ago
Hi Lucie_C,
You could create the calculated column with the formula below.
Column = CALCULATE ( MAX ( 'Table1'[Value] ), FILTER ( 'Table1', YEAR ( 'Table1'[Date] ) = YEAR ( EARLIER ( 'Table1'[Date] ) ) - 1 && [Company] = EARLIER ( Table1[Company] ) ) )Here is your desired output.
Hope this can help you!
Best Regards,
Cherry
v-piga-msft
8 years agoResident Rockstar
Hi Lucie_C,
You could create the calculated column with the formula below.
Column =
CALCULATE (
MAX ( 'Table1'[Value] ),
FILTER (
'Table1',
YEAR ( 'Table1'[Date] )
= YEAR ( EARLIER ( 'Table1'[Date] ) ) - 1
&& [Company] = EARLIER ( Table1[Company] )
)
)
Here is your desired output.
Hope this can help you!
Best Regards,
Cherry
Lucie_C
8 years agoFrequent Visitor
Thank you :)