Forum Discussion
Compare campaigns
- 2 years ago
Hi Broeselchen
Ohh i understood.
Try below video. you will get a exact solution that you are looking for.
https://www.youtube.com/watch?v=TF0lPIYjJfs
https://www.youtube.com/watch?v=hu_fOtZDJwU&t=350s
https://www.youtube.com/watch?v=knXFVf2ipro
I hope I answered your question!
I need something like this:
These are the differents with "sameperiod last year", absolutely and in percent. I need various periods. But without making a new measure for every period.
- Uzi20192 years agoCommunity Champion
hi Broeselchen
Please try this
Same Date range last period =
var _diff = datediff(MIN('Date'[date]),max('Date'[date]),DAY)
var _p_st_date = MINX('Date',DATEADD('Date'[date],-1*_diff,Day))-1
var _p_end_date = MAXX('Date',DATEADD('Date'[date],-1*_diff,Day))-1
Return
CALCULATE(sum(Sales[Sales Amount]),all('Date'[date]),'Date'[date]>=_p_st_date && 'Date'[date]<= _p_end_date
)I hope it may give you dynamic previous previod calculation!