Forum Discussion
Anonymous
6 years agoNot applicable
roll back 12 months
I have a filter final date
I have measure sales, how can I do sum sales from 11 months back to date fin?
7 Replies
- Greg_Deckler
Community Champion
See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008Has both time intelligence formulas and just standard filtering.
- v-deddai1-msft
Community Support
Hi Anonymous ,
Would you please try to use the DATESINPERIOD function to create measure? Here is the sample measure for you reference:
Measure = VAR a = CALCULATE ( MAX ( 'Table'[Date] ), ALLSELECTED ( 'Table' ) ) RETURN CALCULATE ( SUM ( 'Table'[sales] ), FILTER ( ALL ( 'Table' ), DATESINPERIOD ( 'Table'[Date], DATE ( YEAR ( a ), MONTH ( a ), 1 ), -11, MONTH ) ) )Best Regards,
Dedmon Dai
- AnonymousNot applicable
v-deddai1-msft what 'Table' in my case please?
- v-deddai1-msft
Community Support
Sorry, because I modified it on my test data and didn't notice the modification on these details, I have changed it in my original reply.