The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Apologies in advance as this is somewhat complex so I'm try to provide as much detail as I can. Then again, maybe not for someone much smarter than I am... 🙂 If only the StartDate and EndDates are in the table, the result is the earliest and last date for the object. Not the in between dates. When I add the StartDate and EndDates from the table, it all falls into place.
The basic premise of this issue is using IF or SWITCH logic to modify Start and End dates based on the dates selected in a date slicer. It's two tables, the fact table containing the dates and their corresponding object numbers and a date table. So there are four dates;
The dates in the slicer are 04/01/2021 to 31/01/2021. Those constitute the Min Date in Context and Max Date in Context. There are a few combinations of logic that need to be applied. The idea is to return either the StartDate or MinDateInContext, EndDate or MaxDateInContext based on how the two interact wiht the slicer.
EndDate Logic
StartDate Logic
Measures
Sorry wrong image - needs table headers.
With table dates
Without table dates
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
21 | |
12 | |
10 | |
7 |