Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
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.
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!