Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to get previous year value to the current year value

Hello, Can you please help me achieve the ask. Please follow the SS first   I need to display the values under MININCURRED for valuation Date 07/15/2020 beside valuation date 07/15/2021. I...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous,

    I'd like to suggest you use the date function to manually get the previous date for calculating. It is more simple to custom the calculations and not required a calendar table.

    Measure=
    VAR currDate =
        MAX ( 'clm ValuationData'[ValuationDate] )
    RETURN
        CALCULATE (
            [Total Incurred_NEW],//replace this part to your calculated formula or value field
            FILTER (
                ALLSELECTED ( 'clm ValuationData' ),
                'clm ValuationData'[LossDate]
                    = DATE ( YEAR ( currDate ) - 1, MONTH ( currDate ), DAY ( currDate ) )
            )
        )

    Regards,

    Xiaoxin Sheng