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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Nikola1
Regular Visitor

Max number of promotions based on selected time frame

Hi,

Fairly new to the world of PBI and Dax and I couldnt seem to find a solution for an issue i am running into. I am trying to get a promo count by brand using the max number of promtions that have been run during the selected timeframe (normally rolling 12 months).

As background. My data is set up by sku level with a column that has a 0 or 1 if that sku was on promotion for the selected month. Brand is mapped from a different table.

For example if Brand X has 5 skus under it and had different promo counts. I would like to know what is the max number of promotions this brand does as a whole within the year. 

BrandSku #JanFebAprMayJunJulAugSep....Total promo count R12
X

1

0010101003
X20010010002
X30101010115
X40101010115
X50010000012

The result I would like to have is 5. Which is the max sum of promos within the R12 timeframe.

 

This will be in a filtered quadrant chart by brand with that max count and volume. So I would need it to recalculate if I choose R6 instead, or use other filters.

 

Please let me know if this is enough information.

edit:

Essentially the order of operations here would be to sum promo counts for the selected timeframe for each sku. Then find the max of this sum for each brand.

Thanks

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @Nikola1 

 

Please download this file: https://gofile.io/d/y8KBzY

 

https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f5882...

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!!

 

View solution in original post

2 REPLIES 2
VahidDM
Super User
Super User

Hi @Nikola1 

 

Please download this file: https://gofile.io/d/y8KBzY

 

https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f5882...

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!!

 

Thanks, this worked perfectly. I always forget that adding in new columns could help. I made a slight modification to the formula to capture the R12 months from the dataset just becuase my data is set up slighlty differently. But this Worked!!!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.