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.
Solved! Go to Solution.
The issue is ProjectPeriod.
Try:
CF Gantt =
VAR StartDate =
CALCULATE ( MIN ( v_ProjectGantt[ProjectStartDate] ), REMOVEFILTERS ( 'Date' ) )
VAR EndDate =
CALCULATE ( MIN ( v_ProjectGantt[ProjectEndDate] ), REMOVEFILTERS ( 'Date' ) )
VAR ProjectPeriod =
FILTER (
VALUES ( 'Date'[Date] ),
MIN ( 'Date'[Date] ) >= StartDate
&& MIN ( 'Date'[Date] ) <= EndDate
)
VAR ProjectStatus =
CALCULATE ( MIN ( v_ProjectGantt[CompletionStatus] ), REMOVEFILTERS ( 'Date' ) )
VAR Result =
SWITCH (
TRUE (),
MAX ( Date[Date] )
IN ProjectPeriod
&& ProjectStatus = "Completed", 1,
MAX ( Date[Date] )
IN ProjectPeriod
&& ProjectStatus = "Delayed", 2,
MAX ( Date[Date] )
IN ProjectPeriod
&& ProjectStatus = "Open", 3
)
RETURN
Result
Proud to be a Super User!
Paul on Linkedin.
The issue is ProjectPeriod.
Try:
CF Gantt =
VAR StartDate =
CALCULATE ( MIN ( v_ProjectGantt[ProjectStartDate] ), REMOVEFILTERS ( 'Date' ) )
VAR EndDate =
CALCULATE ( MIN ( v_ProjectGantt[ProjectEndDate] ), REMOVEFILTERS ( 'Date' ) )
VAR ProjectPeriod =
FILTER (
VALUES ( 'Date'[Date] ),
MIN ( 'Date'[Date] ) >= StartDate
&& MIN ( 'Date'[Date] ) <= EndDate
)
VAR ProjectStatus =
CALCULATE ( MIN ( v_ProjectGantt[CompletionStatus] ), REMOVEFILTERS ( 'Date' ) )
VAR Result =
SWITCH (
TRUE (),
MAX ( Date[Date] )
IN ProjectPeriod
&& ProjectStatus = "Completed", 1,
MAX ( Date[Date] )
IN ProjectPeriod
&& ProjectStatus = "Delayed", 2,
MAX ( Date[Date] )
IN ProjectPeriod
&& ProjectStatus = "Open", 3
)
RETURN
Result
Proud to be a Super User!
Paul on Linkedin.
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 |
---|---|
61 | |
56 | |
55 | |
36 | |
34 |
User | Count |
---|---|
77 | |
73 | |
45 | |
45 | |
43 |