Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Win a FREE 3 Day Ticket to FabCon Vienna. Apply now

Reply
Anonymous
Not applicable

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

gladyy_varghes_0-1632258770171.png

 

I need to display the values under MININCURRED for valuation Date 07/15/2020 beside valuation date 07/15/2021. I need to elimiate the values displayed under valuation date 07/15/2021 under MININCURRED i.e, for valuation date 07/15/2021, MAXINCURRED is 82,039 and MININCURRED should be 879 for the cause Stain or Injury by Lifting and following the same for the rest. 

Let me tell you the Dax queires used. :

MAXVAL : MAXVAL = CALCULATE([Total Incurred_NEW],
FILTER('clm ValuationData',MAX('clm ValuationData'[ValuationDate])),
(DATESBETWEEN('clm Claims'[LossDate].[Date],DATE(2021,1,1),DATE(2021,7,15))))
MAXINCURRED: 

MAXINCURRED =

CALCULATE(
'clm ValuationData'[Total Incurred_NEW],
FILTER('clm ValuationData',
('clm ValuationData'[MAXVAL])))

 

MINVAL: MinVAL = CALCULATE([Total Incurred_NEW],
FILTER('clm ValuationData',MAX('clm ValuationData'[ValuationDate])),
PREVIOUSYEAR(DATESBETWEEN('clm Claims'[LossDate].[Date],DATE(2021,1,1),DATE(2021,7,15))))

 

MININCURRED =
CALCULATE(
'clm ValuationData'[Total Incurred_NEW],
FILTER('clm ValuationData',
'clm ValuationData'[MinVAL]))

 

If the used Dax is not upto the mark, please help me achieve the above ask if there are any other methods. 

Please help

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.