Forum Discussion
Previous month calculation
Hi amitchandak ,
Would that measure be able to filter the below table?
With the example below it would only have february and the first 10 days of March?
thanks
Liam
Anonymous
Try Like
last Month =
var _maxP = maxx('Period','Period'[snapshot Period])
var _max1 = maxx(filter('Period','Period'[snapshot Period]=_maxP),'Period'[Date])
var _max = date(year(_max1),month(_max1)-1,10)
var _min = date(year(_max),month(_max)-1,1)
return
CALCULATE(SUM('Sales'[Sales]), FILTER(all('Date'), 'Date'[Date]<=_max && 'Date'[Date]>=_min))
Can you share sample data and sample output.
- Anonymous6 years agoNot applicable
Hi amitchandak ,
I basically want it to show february and up to march 10 when you select 2020-03 in the snapshot period.
How can I attach the sample file I have?
Thanks in advance
Liam
- Anonymous6 years agoNot applicable
- v-xuding-msft6 years agoCommunity Support
Hi Anonymous ,
You could upload your dummy pbix file into OneDrive for Business and post the link here. Please do mask sensitive data before uploading.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- v-xuding-msft6 years agoCommunity Support
Hi Anonymous ,
Could you tell me if your problem has been solved? If it is, kindly mark the helpful answer as a solution if you feel that makes sense. Welcome to share your own solution. More people will benefit from the thread.
If you still have questions, please share a sample to us. Then we will understand clearly.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.