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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
tiny
Frequent Visitor

Filter table dynamically based on multiple selections from a Slicer

Hello,

I'm trying to filter table dynamically based on multiple selections from a Slicer. Here is an example, I have a date table and is used as slicer, the slicer is with a hierarchy  (Year->Month->Day) and mutiple selections, here is the date table:

tiny_0-1698967516307.png

We have another table sales: it only has data for year/month, not date, but the slicer can select date because other table is also using it

tiny_1-1698967586433.png

Now what we need to do is that:

User can select multiple dates from the slicer, for example, they can select 2023/10/1 and 2023/9, we need to calculate dynamicly based on the selections on Sales table for the total sales, the results should look like this:

tiny_2-1698967970699.png

Could we do it using DAX? 

Thank you very much for your help!

 

 

 

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

CALCULATE(SUM(Sales[Sales]),TREATAS(VALUES(DateTable[Date YM]),Sales[Date YM]))

View solution in original post

2 REPLIES 2
tiny
Frequent Visitor

Perfect! Works great 🙂 Thank you very much! Really appreciated!

wdx223_Daniel
Super User
Super User

CALCULATE(SUM(Sales[Sales]),TREATAS(VALUES(DateTable[Date YM]),Sales[Date YM]))

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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