Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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:
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
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:
Could we do it using DAX?
Thank you very much for your help!
Solved! Go to Solution.
CALCULATE(SUM(Sales[Sales]),TREATAS(VALUES(DateTable[Date YM]),Sales[Date YM]))
Perfect! Works great 🙂 Thank you very much! Really appreciated!
CALCULATE(SUM(Sales[Sales]),TREATAS(VALUES(DateTable[Date YM]),Sales[Date YM]))
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
11 | |
9 | |
6 |