Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

USERELATIONSHIP problem with appended Query

I have items created and closed each month. This was working for years and then we appended data from a new source. Since appending the query, this measure is no longer working. My current relationship from the appended source to my date table is as follows. The relationship uses the creation date. My measure uses the USERELATIONSHIP function to get the number of closed items.

     

It's properly calculating the created per month. However, my measure is not correctly picking up items closed from the new data source.

 

Here's my measure to get the closed items per month.

 

 

 

Count Closed Actions := 
CALCULATE(COUNTROWS('EQMS Appended'),
    'EQMS Appended'[Date Closed],
    USERELATIONSHIP('EQMS Appended'[Date Closed],'Date Table'[Date])
    )

 

 

 

  • Just to discard possible issues, is the date closed field in the appended table formatted as date type (it must be the same type as the date field in the Date Table)?

4 Replies

  • PaulDBrown's avatar
    PaulDBrown
    Community Champion

    Try:
    Count closed actions =
    CALCULATE(COUNTROWS (EQMS Appended), USERELATIONSHIP(EQMS Appended [Date Closed],  Date Table [Date]))

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thank you Paul. Sadly, my issue remains.

    • PaulDBrown's avatar
      PaulDBrown
      Community Champion

      Just to discard possible issues, is the date closed field in the appended table formatted as date type (it must be the same type as the date field in the Date Table)?

      • Anonymous's avatar
        Anonymous
        Not applicable

        Thank you Paul! My appended query was using DateTime! Once I updated it to date, it was working properly! Thank you so much!