Forum Discussion

ziva5's avatar
ziva5
New Member
3 years ago

Accumulated Performance Calculation

Hello,
i have a precalculated monthly performance table and i want to create a measure that calculate accumulated performance.
accumulated performance shuold be calculated from the date that user choose in slicer parameter to show the monthly performance.
i tried the below Measure to reterive the previus month value, and then use it in new measure to summarize it, but it returns a null value
can anyone help me please
thanks,


Prev Value = CALCULATE ([Return] ,FILTER ( KeyPerformanceMonthly,KeyPerformanceMonthly[Start of Month]=[Prev Month] ))

 

 

5 Replies

    • ziva5's avatar
      ziva5
      New Member

      Hi, thanks for your reply.

      Attached you can find a PBIX example.

      It is important to emphasize that in my real case I work with Direct Queries

      Sample pbix 

      • ziva5's avatar
        ziva5
        New Member

        Hi,
        I managed to solve the previus issue by changing the measure to the following :
        Prev Value = CALCULATE ([Return] ,DATEADD ( KeyPerformanceMonthly[Start of Month],-1,MONTH ))
        Now I need your help to calculate the Accumulated Performance
        Updated PBIX attached

         

        Updated PBIX 

  • Hi ziva5 ,

     

    I can't open the sample you provided due to some missing files, but you can try this measure:

    Prev Value = CALCULATE ([Return] ,FILTER ( ALL(KeyPerformanceMonthly),KeyPerformanceMonthly[Start of Month]=[Prev Month] ))

     

    Best Regards,

    Jianbo Li

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

  • Hi ziva5 ,

     

    Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

     

    Refer to:

    How to provide sample data in the Power BI Forum

    How to Get Your Question Answered Quickly

     

    Best Regards,

    Jianbo Li

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