Forum Discussion

ajayemmadi1's avatar
ajayemmadi1
Helper I
7 years ago
Solved

Previous Day Value

I am facing and issue in fetching previous day amount using current day amount. Can anyone let me know the exact DAX formula for the same.

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi I just want to display last day sale of month. 

    If last day sale is Zero then it should take previous day sale.

    If that also zero then again it should take previous day sale.

    Like that it should be dynamic.

    Can you pleae write a DAX and send to me.

    • Age's avatar
      Age
      Frequent Visitor

      What if the date of previous day didn't exist, for the example: 

      Date                    Value
      23 Jan 2021          10
      24 Jan 2021          100
      26 Jan 2021          200

      can that DAX formula still works?

      • Dhacd's avatar
        Dhacd
        Resolver III

        In this case, the earlier() function is your friend.

        Regards.

        Atma.