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
jowah37
New Member

Group sales based on date range

Hi ! 

I'm stucked with a problem I hope someone in the community can help with... 

I need to group my sales data so I know what is "Current", "Previous", "Fixed" and "Clearance". I need to base it on campaign numbers so that 2209 eg. is current and 2208 is previous, 2206 Clearance etc.  

I have a dates lookup table and the campaign codes are connected as a many-1 relationship between the sales table and product data lookup table with the SKU as the KEY. 

Hope somebody can point me in the right direction 

/Jonas

1 REPLY 1
johnt75
Super User
Super User

Create a new dimension table for Campaigns, with Campaign Name and Campaign Code as the columns, and a sort order column if needed, with one row per Campaign Code, and then link that to your product table as one-to-many. You can then use the Campaign Name column in any visuals and that will group your sales automatically.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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