Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Broeselchen
Helper III
Helper III

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?

1 ACCEPTED SOLUTION

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!

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

View solution in original post

6 REPLIES 6
Broeselchen
Helper III
Helper 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.

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!

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

That's it! Thank you so much!!!

Broeselchen
Helper III
Helper III

I need something like this:

Broeselchen_1-1718186479539.png

 

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.

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!

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
Uzi2019
Super User
Super User

Hi @Broeselchen 

 

Yes. you can compare the various campaigns it completly depends on how you want to show different comparison..

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.