Forum Discussion

V_Ledyaev's avatar
V_Ledyaev
Regular Visitor
8 years ago
Solved

Dynamic count by filtered related table

Hello. I have a two tables. Users and Action. Each action has Timestamp and UserId. I need to show all users that didn't do any action in specified period (date slicer). How to create measure that calculates count of actions for each user in the related table filtered by date range?

  • Hi V_Ledyaev,

     

    Suppose there existing a relationship between two tables, Users and Action.

     

    Create measures like:

    Count action = COUNT('Action'[Action])
    
    Count users without action = CALCULATE(DISTINCTCOUNT(Users[UserID]),FILTER(ALL(Users),[Count action]=BLANK()))

     

    Best regards,

    Yuliana Gu

1 Reply

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi V_Ledyaev,

     

    Suppose there existing a relationship between two tables, Users and Action.

     

    Create measures like:

    Count action = COUNT('Action'[Action])
    
    Count users without action = CALCULATE(DISTINCTCOUNT(Users[UserID]),FILTER(ALL(Users),[Count action]=BLANK()))

     

    Best regards,

    Yuliana Gu