Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
8 |