Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have two date slicers, Create Date and Close Date. Both are used as relative date slicers and will select a date range. I have one table that just returns a bunch of item detail data, no aggregations. I need the slicers to filter the table as an "or" condition, rather than "and".
If I select Create Date in Last 1 week and Close Date in Next 1 week, I should see all records that either have a Create Date in the last week OR a Close Date in the next week. Since the slicers can return multiple values, I think I need to use "ALLSELECTED" function, but I am having trouble figuring out how to use it in a measure to filter the table with since I am not calculating any aggregations. Anyone have ideas?
Solved! Go to Solution.
Hi @smileamile2
Create two another identical tables.
date 2 = ALLSELECTED('date'[date])
Apply two tables of date for two slicer respectively.
Then create a measure.
slicer_date = IF(SELECTEDVALUE('date'[date]) in VALUES('date 1'[date]) || SELECTEDVALUE('date'[date]) in VALUES('date 2'[date]),1,0)
Finally, put the measure on the data filter.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards
Community Support Team _ Polly
Hi @smileamile2
Create two another identical tables.
date 2 = ALLSELECTED('date'[date])
Apply two tables of date for two slicer respectively.
Then create a measure.
slicer_date = IF(SELECTEDVALUE('date'[date]) in VALUES('date 1'[date]) || SELECTEDVALUE('date'[date]) in VALUES('date 2'[date]),1,0)
Finally, put the measure on the data filter.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards
Community Support Team _ Polly
@smileamile2 , As long as all other columns other than the measure you created are un summarized, measure will filter the table
With independent date table
example
measure =
VAR _max = MAXX(allselected('Date1'),'Date1' [Date])
return
countrows(filter(Table, Table[Create Date] >=_max-7 && [Create Date] <= _max && Table[close Date] >=_max && [Close Date] <= _max +7 ))
use this measure with all other fields as un summarized in visual.
Or filter this value is not blank in the visual level filter
Well, I can't have the +-7 in the measure itself. I have relative date slicers that allow user to select any date range that can change
User | Count |
---|---|
123 | |
77 | |
62 | |
50 | |
48 |
User | Count |
---|---|
175 | |
125 | |
61 | |
60 | |
58 |