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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors