Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowGet certified as a Fabric Data Engineer: Check your eligibility for a 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700. Get started
Im trying to write Dax formula that gives the number of overlapping time periods for that row with the other rows with the same material #
Solved! Go to Solution.
Hi @Anonymous
You have one line on your data where the end date is before the start date. I've assumed that's a typo in this solution. If that is something that can occur the CALENDAR function will cause an error
Overlaps =
VAR _calendar = CALENDAR('Table'[start date], 'Table'[end date])
VAR _material = 'Table'[Material #]
RETURN
COUNTROWS(
FILTER('Table',
'Table'[Material #] = _material
&& COUNTROWS(INTERSECT(CALENDAR('Table'[start date], 'Table'[end date]), _calendar)) > 0
)
) - 1
Hi @Anonymous
You have one line on your data where the end date is before the start date. I've assumed that's a typo in this solution. If that is something that can occur the CALENDAR function will cause an error
Overlaps =
VAR _calendar = CALENDAR('Table'[start date], 'Table'[end date])
VAR _material = 'Table'[Material #]
RETURN
COUNTROWS(
FILTER('Table',
'Table'[Material #] = _material
&& COUNTROWS(INTERSECT(CALENDAR('Table'[start date], 'Table'[end date]), _calendar)) > 0
)
) - 1
can you modify this so it return the maxium over lap by day over the time interval.
i want the column to show the most number by row material number it over laps with on a single day. Not the whole start to end date.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
22 | |
17 | |
16 | |
11 | |
7 |
User | Count |
---|---|
26 | |
25 | |
12 | |
12 | |
12 |