Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

How to use EARLIER function

HI, all   I need your help about how to use EARLIER function. The detail is below.   <data model>   <What I realize> To calculate sum of shipment by date as below using EARLIER function...
  • amitchandak's avatar
    4 years ago

    Anonymous , if you are creating a measure then try like , assuming sum_shipment is a measure

     

    cumulation2 = CALCULATE('Measure_001_shipment'[sum_shipment], filter(allselected('Dimension_002_Calender') , 'Dimension_002_Calender'[Date] >= max('Dimension_002_Calender'[Date])) )

     

    or

     

     

    cumulation2 = CALCULATE('Measure_001_shipment'[sum_shipment], filter(allselected('Dimension_002_Calender') , 'Dimension_002_Calender'[Date] <= max('Dimension_002_Calender'[Date])) )

     

    You can use all in place of allselected

     

    Earlier we will use in case same table operation in a new column