Forum Discussion
Compare campaigns
I have measure with metrics for various campaigns in PowerBI. Can I only compare certain campaigns? So, for example, a campaign that ran from March 1st to April 20th, 2023 with one that ran from March 5th to April 24th, 2024?
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!
6 Replies
- Uzi2019Community Champion
Hi Broeselchen
Yes. you can compare the various campaigns it completly depends on how you want to show different comparison..
- BroeselchenHelper III
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.
- Uzi2019Community 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!
- BroeselchenHelper III
But I don't want the "same date range last period". I need an other period in the last year then in the current year. Maybe the comparison between May 2023 and June 2024.
- Uzi2019Community Champion
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!
- BroeselchenHelper III
That's it! Thank you so much!!!