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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
PJHos
Advocate I
Advocate I

gantt chart from a matrix min max dates not showing

Hi all
 
i am trying to create a gantt chart from a matric visual and have used the below from a previous thread. However, this is not calculating the 1 in the correct date columns. I have tested each line, start and end dates give me the projected start and end dates however when testing projectperiod i get false for every column so it must be my date table or relationship but i cannot figure it out.
 
date table was created using the following DAX and marked as a date table, relationship is many to one calendar filters projects table (automatically created by PBI)
 
Calendar = CALENDAR(DATE(2023, 01, 01), DATE(2030, 12, 31))
 
 
 
VAR StartDate = CALCULATE(MIN('Projects'[Project Start Date].[Date]), filter('Projects', 'Projects'[Site Id]))
VAR EndDate = CALCULATE(MIN('Projects'[Calculated Project End Date].[Date]), FILTER('Projects', 'Projects'[Site  Id]))
VAR ProjectPeriod =  MIN('Calendar'[Date]) >= StartDate &&
                                  MIN('Calendar'[Date]) <= EndDate
VAR CalcPeriod =  IF(ProjectPeriod, 1, 0)
VAR RESULT = CalcPeriod
RETURN
RESULT
 
any help much appreciated
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@PJHos , check if the measure created can help

Matrix as Project plan Visual: https://youtu.be/R25QoiyoSVs

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@PJHos , check if the measure created can help

Matrix as Project plan Visual: https://youtu.be/R25QoiyoSVs

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you Amit!!

 

I am not really sure how or why but it worked, thank you 😀

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.