Forum Discussion

jp_fondu's avatar
jp_fondu
New Member
4 years ago
Solved

Using USERELATIOSHIP with a FILTER - Not working

Hey,    I have a table with a list of home repairs.  I have the date the job was raised and the date it was complete.     My date table has an active relationship to the job raised date column, a...
  • MFelix's avatar
    4 years ago

    Hi jp_fondu 

     

    This is related with the context and how it's applied, in this case you first need to apply the filter to the table of the countx and then the USERELATIONSHIP.

     

    Try the following measure:

    M Total Completed Jobs =
    CALCULATE (
        COUNTX (
            FILTER ( Repairs_Main, Repairs_Main[Repair Priority Bracket] = "Response" ),
            Repairs_Main[Job Number as integer]
        ),
        USERELATIONSHIP ( Repairs_Main[Date Job Completed (Date Only)], 'Date'[Date] )
    )