Forum Discussion

adealboran777's avatar
adealboran777
Frequent Visitor
8 years ago
Solved

Date and Two Table

Hi!

 

Let's see if somebody knows how to do this.

 

I have two tables:

 

  1. The first one records several interactions with an app, which can be of Type A or B, during a period of time.
    1. Date.
    2. InteractionID.
    3. UserID
    4. Interaction --> A or B.
  2. The second one has a list of users with the following fields:
    1. UserID.
    2. Centercost --> 1 or 2.

My objective is to get a chart with an X-axis showing the number of interactions type A achieved (up to 8) and a Y-axis showing the number of UserID that achieved such number of interactions type A. Also, it needs to be filtered by the variable Date (time).

 

So, I need something that counts the number of interactions per user and afterwards something that counts the number of users with a given number of interacions.

 

How would you do it? I have tried different approaches but I am not able to do it. For instance, I have tried to count the number of interacions type A done using a new column on the second table, but it doesn't take into account the Date when using a filter. 

 

Thanks in advance!

  • So this is going to basically look like:

     

    Interactions Measure = 
    COUNTROWS(FILTER('InteractionsTable',[Interaction]="A"))
    
    
    Users Above Threshold Measure = 
    COUNTROWS(
        FILTER(
            SUMMARIZE('UserTable',[UserID],"__Interactions",[Interactions Measure]),
            [__Interactions] >= 5
        )
    )

    For users with 5 or more interactions.

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    So this is going to basically look like:

     

    Interactions Measure = 
    COUNTROWS(FILTER('InteractionsTable',[Interaction]="A"))
    
    
    Users Above Threshold Measure = 
    COUNTROWS(
        FILTER(
            SUMMARIZE('UserTable',[UserID],"__Interactions",[Interactions Measure]),
            [__Interactions] >= 5
        )
    )

    For users with 5 or more interactions.