Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Bluenred22
Helper I
Helper I

showing which Date ranges are overlapping in Power BI

Hello, 

 

I am trying to show overlapping dates in Power BI. I managed to show that there are overlaps (using counts). However, I dont know how to show the date ranges that have overlapping in the data. Could you please show how this is done 🙂

 

attached is the file and a screenshot of the report. @GPower   

 

Final Vacation Report.pbix

 

Screenshot 2024-01-25 at 8.32.15 AM.png

16 REPLIES 16
Bluenred22
Helper I
Helper I

thanks for the reply @lbendlin im trying to show a highlight of the date ranges that have overlapping. 

Screenshot 2024-02-01 at 2.50.11 PM.png

 is it possible to do somthing like this and hightlight overlaping date ranges with a different color. 🙂 

 

 

Regards, 

 

Bluenred22

That is a bad idea.  I will not offer you a solution that involves a lot of horizontal scrolling.  You can consider something like this

 

lbendlin_0-1706792060079.png

 

Hmm, I understand that this is a bad Idea but I need to show the overlapping from the range of dates and who are thos names within the calendar 

 

see attached. Same DAX, basically.

what is the DAX for that @lbendlin ?

Bluenred22
Helper I
Helper I

Hello @lbendlin apologies kindly find the new link to the file: https://drive.google.com/file/d/12M6mOhkxRh68H8kZP48MRzm7BNo9A4k1/view?usp=share_link

Regards, 

 

Bluenred22

lbendlin_0-1706750703496.png

see attached.

ov = number of days with overlaps

# name = number of people on vacation in (part of)  that period.

 

could you kindly explain how did you get  the OV and # name as I am trying to replicate it on the acutal report. I found a visual that can create a gant chart and show bras for the dates taken however I still want to color the overlaping dates.  kindly find attached: https://1drv.ms/u/s!AqREvlcyX-9Dgvlj43Yc_b0vo2Oz2g?e=aC3e5h @collinq @slorin guys if anyone has any tip on the case please let me know also 🙂 

 

OverlappingLeaves = 
var a = SUMMARIZECOLUMNS('Leaves'[Name],'Leaves'[Start],'Leaves'[End],'Date'[Date])
var b = ADDCOLUMNS(a, "ov", if([Start]<=[Date] && [End]>=[Date],1,0))
var c = summarize(b,[Date],"ct",var d=[Date] return sumx(filter(b,[Date]=d),[ov]))
return countrows(filter(c,[ct]>1))

var a:  Create a cross join of users, their leaves  (could be multiple) and dates

var b: check if the individual date falls into the individual leave period

var c: for each date calculate the number of users that are on leave on that date

 

Then you can decide what to do with the result. Either a simple flag that yes, overlap exists, or an indication how many users are on vacation on the same date.

what I want to know is how you added the OV and #name separately in the Values section @lbendlin 

Bluenred22_0-1707016972061.png

 

you can drag as many measures as you want into the Values area of a visual.  If it doesn't work for you then you may already have a field in the Legends area. Remove that, and try again.

Dear @lbendlin , 

 

I have managed to show the available dates instead but this is only happing between two vacations. However, I would like to show available dates after the last vacation forward. I have indicated as an example where the availablity should show (in orange arrows). Also I have notesed that availablity in the middle is not appearing for some vacations. the trick that I used to get it is to appeend the tables after creating a duplicate of the table with some Dax columns involved

 

kindly find the link to the file. https://drive.google.com/file/d/1dn3bZl7VhIoDrkcZSiMqH9gB9o6q_mM2/view?usp=drive_link

 

Bluenred22_0-1707201766577.png

 

 

Regards, 

 

Bluenred22

access denied.

 

What do you need to show the available period for? Isn't that implied?

I thought I could get the overlaps by getting availability period first. 

 

However I still want to flag the overlaps within this gantt chart. 

That's not what a Gantt chart is for. Use a matrix or a custom chart like Deneb that can show value ranges.

lbendlin
Super User
Super User

Please check the link to the file.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors