Forum Discussion

Roland74's avatar
Roland74
Icon for Helper I rankHelper I
1 year ago
Solved

USERELATIONSHIP and FILTER

Hi all, Needs some help, because i don't know why the next formula doesn't work. I've got a table with the next result:   When i count the rows with reason PRJ_REISWW with the next formula ...
  • johnt75's avatar
    1 year ago

    Don't filter entire tables, just filter the columns you need. You can use

    Test_ROWS_High =
    CALCULATE (
        COUNTROWS ( factPostedHourLine ),
        USERELATIONSHIP ( factPostedHourLine[WorkingDateID], 'Date'[DateID] ),
        Reason[ReasonCode] = "PRJ_REISWW",
        factPostedHourLine[Hours_Working_Date] > 0.50
    )
    

    For detailed explanations of why its not working search https://www.sqlbi.com  for "expanded tables".