Forum Discussion

shanipowerbi's avatar
shanipowerbi
Icon for Helper III rankHelper III
6 years ago
Solved

Calculate Last month Amount

Hi Hope you all are fine and healthy   I need very little help from you guys   I have two Columns Date                    Amount         Last Month 01 Jan 2020         $ 5000 02 Feb 2020     ...
  • V-lianl-msft's avatar
    6 years ago

    Hi shanipowerbi ,

     

    Your method is right. You just need to add filter conditions to your formula.

    last_month = IF(MAX('table'[date].[Date]<TODAY(),CALCULATE(SUM('table'[amount]),DATEADD('table'[date].[Date],-1,MONTH)))

     

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