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
Nicolas
Frequent Visitor

YTD Sales per Salesrep + Date Slicer

Hello all!

 

I'm trying to make a clustered column chart with Last Year Sales and Current Year Sales side-by-side PER SalesRep.

The columns with the data come from several different tables. That's why I'm thinking about creating a new table to group all the columns coming from the different tables.

 

So the table would look like:

 

Entry #DateRep ID     Rep NameOrderTotal
12509/8/20151John $         599.00
125110/10/20152Paul $         451.00
125212/15/20152Paul $         238.00
12533/30/20161John $         773.00
12546/4/20161John $     1,740.00
12558/17/20162Paul $     1,223.00
12569/17/20161John $         874.00

 

1. Which DAX Function would help me to import all the columns from different tables in one new Table?

2. How could I do the SUM of Sales per Year per Salesmen and display it in a clustered chart? I would then like to slice it per Month/Week/Day.

 

I made a little graph on illustrator to show what the final chart should look like:

Sales Per Week Per Salesmen with Slicer-01-01.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Thanks so much for your help!

 

 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

You should probably do your merging in the Query Editor, not DAX.

 

If you had the table as you describe, you could create your chart by using "Rep Name" as the axis, "OrderTotal" as the value. You could create a column like:

 

Year = YEAR([Date])

Use that as your legend.

 

Create these two columns for your slicers:

 

WeekNum = WEEKNUM([Date])

Month = MONTH([Date])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
TrebligC
New Member

You'd probably want to change the Custom Column [Month] formula to Month = FORMAT(MONTH(Table1[Date]),"MMMM") to get the full month name in your slicer as you had shown.

Greg_Deckler
Community Champion
Community Champion

You should probably do your merging in the Query Editor, not DAX.

 

If you had the table as you describe, you could create your chart by using "Rep Name" as the axis, "OrderTotal" as the value. You could create a column like:

 

Year = YEAR([Date])

Use that as your legend.

 

Create these two columns for your slicers:

 

WeekNum = WEEKNUM([Date])

Month = MONTH([Date])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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.