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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
U156531
Post Patron
Post Patron

How do I add a YTD selection to date slicer

I need my slicer to have a YTD option along with months for the year. So for this example YTD would be 2024 Jan-Jun. Does anyone know how to accomplish this

 

U156531_0-1719406642383.png

 

1 ACCEPTED SOLUTION
Kishore_KVN
Super User
Super User

Hello @U156531 ,
you have to create a new calculated table and that need to be connected with your calendar table with Bi-Direction filtering. 

Your new calcualted table should have below similar calculation:

Slicer Table = 
UNION(
ADDCOLUMNS(
DATESYTD(CALENDAR_TABLE[DATE]),
"Period","YTD",
"Order",1),
ADDCOLUMNS(
CALENDAR(MIN(CALENDAR_TABLE[DATE]),MAX(CALENDAR_TABLE[DATE])),
"Period","DATES",
"Order",2)
)

 

Now select Period column and sort by Order column and then use this Period column in the slicer. Dont forget about creating relationships 🙂

 

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

View solution in original post

1 REPLY 1
Kishore_KVN
Super User
Super User

Hello @U156531 ,
you have to create a new calculated table and that need to be connected with your calendar table with Bi-Direction filtering. 

Your new calcualted table should have below similar calculation:

Slicer Table = 
UNION(
ADDCOLUMNS(
DATESYTD(CALENDAR_TABLE[DATE]),
"Period","YTD",
"Order",1),
ADDCOLUMNS(
CALENDAR(MIN(CALENDAR_TABLE[DATE]),MAX(CALENDAR_TABLE[DATE])),
"Period","DATES",
"Order",2)
)

 

Now select Period column and sort by Order column and then use this Period column in the slicer. Dont forget about creating relationships 🙂

 

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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors