Forum Discussion
ryan_mayu
Super User
7 years agoUrgent! Need help!!
Hi , i have a sample data below. How can I use DAX to get the below result? I want to get the total sales in of pervious three months. Jan=Jan, Feb=Jan+Feb Mar=Jan+Feb+Mar .... Sep=Ju...
- 7 years ago
ryan_mayu Here is the measure for same...
Test46Out = CALCULATE(SUM(Test46CummSum[Value]),FILTER(ALL(Test46CummSum),Test46CummSum[Date] <= MAX(Test46CummSum[Date]) && YEAR(Test46CummSum[Date]) = YEAR(MAX(Test46CummSum[Date])) && DATEDIFF(Test46CummSum[Date],MAX(Test46CummSum[Date]),MONTH)<=2 ))
PattemManohar
Community Champion
7 years agoryan_mayu Yes, Ofcourse !! In that case, try the same DAX by removing the YEAR condition in the FILTER.
ryan_mayu
Super User
7 years agoPattemManohar, I will try that. Thanks a lot.