Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Dynamically find the previous 3 months average

Hi All,

I'm newbie to this forum and here is my first post. I am trying to create a column that shows the prev 3 months avg.

forecasted  dynamically. Evey new months added to the  table automatically will calculate the previous 3 month average. ex.  for April will calculate the previos average of Feb, Mar and Apr while for June will calculate the previous avg of May, April and March.

 

To get the Total Good% and IN Process% here is the formula: 

 

Total Good% = Total Good / Total IN

IN Process% = IN Process / Total IN

 

To find the previous 3 Months avg the formula is:  ( Total Good% * prev. 3 months average of  Total Good%) + TOtal Good%

 

 

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Could someone help me to find a solution or idea using DAX expression. By the way, I'm new in PBI and DAX. Thanks.

    Below is a sample data

    dt	total IN	Total OUT	Good	 OUT% 	Good%	3MonthsFcst
    2/1/2019	79606	51384	0	0.65	0.00	
    3/1/2019	84194	61211	0	0.73	0.00	
    4/1/2019	92458	67807	0	0.73	0.00	
    5/1/2019	94531	66988	95	0.71	0.10	70.93%
    6/1/2019	29832	18181	2903	0.61	9.73	67.98%

     

    • dm-p's avatar
      dm-p
      Super User

      Hi Anonymous - I just noticed this hadn't had much traction and took a look and it seems like a DAX problem rather than something that needs developer focus. You might get a faster response in the DAX Forum of the community, as a lot more people frequent that one and are more readily available to assist you.

      Regards,

      Daniel

      • Anonymous's avatar
        Anonymous
        Not applicable

        Thank you for giving me the right direction to post my concerned.