Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Last Date -1

Hi Everyone

 

i have a formula which works well for me

 

Daily revenue =
CALCULATE(SUM('Daily Net Revenue TRIAL'[Actual]),LASTDATE('Daily Net Revenue TRIAL'[Date]))
 
All i want is to calculate  now is Last Date -1 ............( that would be prior day)
 
Can you help?
I tried max -1 , did not work
  • Hi Anonymous ,

     

    Would you please try to use the following measure:

     

     

    Daily revenue =
    CALCULATE(SUM('Daily Net Revenue TRIAL'[Actual]),FILTER('Daily Net Revenue TRIAL','Daily Net Revenue TRIAL'[Date] = MAX('Daily Net Revenue TRIAL'[Date])-1)

     

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

    Best Regards,

    Dedmon Dai

4 Replies

  • Anonymous , Try like

    CALCULATE(SUM('Daily Net Revenue TRIAL'[Actual]),LASTDATE('Daily Net Revenue TRIAL'[Date])-1)

    • Anonymous's avatar
      Anonymous
      Not applicable

      i tried this earlier, did not work

      • v-deddai1-msft's avatar
        v-deddai1-msft
        Icon for Community Support rankCommunity Support

        Hi Anonymous ,

         

        Would you please try to use the following measure:

         

         

        Daily revenue =
        CALCULATE(SUM('Daily Net Revenue TRIAL'[Actual]),FILTER('Daily Net Revenue TRIAL','Daily Net Revenue TRIAL'[Date] = MAX('Daily Net Revenue TRIAL'[Date])-1)

         

         

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

         

        Best Regards,

        Dedmon Dai