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