Forum Discussion

philjohn's avatar
philjohn
Frequent Visitor
5 months ago
Solved

P6 Metrics using several date fields in one table

I am trying to replicate a table from excel in Power BI with a P6 export Year/Month - followed by several metrics including "In Period Activities Started as Planned" "In Period Activities Finished n...
  • johnt75's avatar
    5 months ago

    I would create inactive relationships with the actual start and end date columns but not the baseline columns. You can manually apply filters to the baseline columns like

    In Period Activities Started as Planned =
    VAR VisibleDates =
        VALUES ( 'Date'[Date] )
    VAR Result =
        COUNTROWS (
            CALCULATETABLE (
                Activities,
                USERELATIONSHIP ( 'Date'[Date], Activities[Actual Start Date] ),
                Activities[Baseline Start Date] IN VisibleDates
            )
        )
    RETURN
        Result
    
    In Period Activities Finished not in Baseline =
    VAR VisibleDates =
        VALUES ( 'Date'[Date] )
    VAR Result =
        COUNTROWS (
            CALCULATETABLE (
                Activities,
                USERELATIONSHIP ( 'Date'[Date], Activities[Actual Finish Date] ),
                NOT Activities[Baseline Finish Date] IN VisibleDates
            )
        )
    RETURN
        Result
    
  • philjohn's avatar
    philjohn
    5 months ago

    It worked!!! Oh god its been 2 days of me smashing my head against the desk, thank you so so so much