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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JonSquires
New Member

Year to date on a vis with week number slicer

Hello 

 

i am making my first forays into the world of power BI and I am having trouble withthe slicer selctions. 

I have a dashboard vis that I want to reflect a weeks worth of data , I have a week number slicer and this works perfectly.however to add context I want to show a ytd chart which sows all weeks in a year. 

 

For instance if I make a selection for week 19 ~I want a graph that will show weeks 1 - 19. I can get a total for that peiod using Allexcept, but I can't get it show a figure for week 1 week 2 week3  upto week 19. The chart just shows one point for week 19 (presumably because this is the field that the slicer is acting on) with a total doe year to date. 

 

Is this possible? 

 

2 REPLIES 2
Mariusz
Community Champion
Community Champion

HI @JonSquires 

You can use DAX Expression below.

Sales YTD = 
CALCULATE(
    [Sales] -- Your Measure or expression,
    DATESYTD( 'Calendar'[Date] ) --calendar dimension date column
)

Regards,
Mariusz

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

I havbe tried this and I can only get this to work if i use the slicer as less than equal to rather than a single selection from a list or drop down ?

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 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.