Forum Discussion

ReadTheIron's avatar
ReadTheIron
Icon for Helper III rankHelper III
4 years ago
Solved

Matrix for Dates after Latest Date

I have two tables, one for failures and one for repairs.   They're not related to each other, but they're both related to AllAssets, a list of all unique assets. I want to create...
  • moizsherwani's avatar
    4 years ago

    ReadTheIron You could use a measure as a filter (visual fitler) on the table as below. I have attached the file as an example to get you started

     

    FailureDateAfterRepairDate =
    VAR MaxRepairDate =
        CALCULATE ( MAX ( Repair[RepairDate] ), ALLEXCEPT ( Repair, AllAssets[Asset] ) )
    VAR CurrentFailureDate =
        SELECTEDVALUE ( Failure[FailureDate] )
    RETURN
        IF ( CurrentFailureDate > MaxRepairDate, 1, BLANK () )