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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.