Forum Discussion
Filter table based on date ranger slicer
- 1 year ago
Hi Anonymous,
Thank you for reaching out to the Microsoft fabric community forum. Thank you bhanu_gautam, for your input on this issue.After thoroughly reviewing the details you provided, I was able to reproduce the scenario, I have used it as sample data on my end and successfully implemented it.
Dax Measure:
IsWithinSelectedRange = VAR SelectedStart = MIN('01. Dim_Date'[Date]) VAR SelectedEnd = MAX('01. Dim_Date'[Date]) RETURN IF ( MIN(Fact_RO_Contract'[OrderStart]) >= SelectedStart && MAX(Fact_RO_Contract'[OrderEnd]) <= SelectedEnd && MIN(Fact_RO_Contract'[DeliveryStart]) >= SelectedStart && MAX(Fact_RO_Contract'[DeliveryEnd]) <= SelectedEnd && MIN(Fact_RO_Contract'[ShipmentStart]) >= SelectedStart && MAX(Fact_RO_Contract'[ShipmentEnd]) <= SelectedEnd, 1, 0 )Output:
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
Hi Anonymous,
Thank you for reaching out to the Microsoft fabric community forum. Thank you bhanu_gautam, for your input on this issue.
After thoroughly reviewing the details you provided, I was able to reproduce the scenario, I have used it as sample data on my end and successfully implemented it.
Dax Measure:
IsWithinSelectedRange =
VAR SelectedStart = MIN('01. Dim_Date'[Date])
VAR SelectedEnd = MAX('01. Dim_Date'[Date])
RETURN
IF (
MIN(Fact_RO_Contract'[OrderStart]) >= SelectedStart &&
MAX(Fact_RO_Contract'[OrderEnd]) <= SelectedEnd &&
MIN(Fact_RO_Contract'[DeliveryStart]) >= SelectedStart &&
MAX(Fact_RO_Contract'[DeliveryEnd]) <= SelectedEnd &&
MIN(Fact_RO_Contract'[ShipmentStart]) >= SelectedStart &&
MAX(Fact_RO_Contract'[ShipmentEnd]) <= SelectedEnd,
1,
0
)
Output:
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
- Anonymous1 year agoNot applicable
Thanks, mind explaining why this works and not when using SELECTEDVALUE?