Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

6 Consecutive Points either increasing or decreasing in the same direction

Hi Experts

 

See attached PBIX file which a Super Userw member Greg Deckler help'd out with in completing the first step. Now i am trying to find 6 data point that increase and decreasing in the same driection . Greg focused on 6 data points above or below the average.

 

See image

 

I believe according to Greg's notes the answer lies with the  "__Diff". I cannot figure out the final DAX in order to make this work. 

 

Sample File

https://www.dropbox.com/s/c7i6dny63titwpr/Trendspotting.pbix?dl=0 

  • Anonymous , When I opened your file. Lost with few measures you have. I think you need to check six months 6 consecutive points on  [No Trend Measure].

     

    I am thinking of to approach like assume Diff % using this month vs last month

     

    Rolling 6 = if(CALCULATE(sumx(values('Date'),if([Diff %] >0,1,blank())),DATESINPERIOD('Date'[Date ],MAX('Date'[Date]),-6,MONTH)) =6 ,1,0)

     

    for any month this is 1, it means growth for the last 6 month.

     

    same way for < 0

6 Replies