Forum Discussion
Date and Two Table
Hi!
Let's see if somebody knows how to do this.
I have two tables:
- The first one records several interactions with an app, which can be of Type A or B, during a period of time.
- Date.
- InteractionID.
- UserID
- Interaction --> A or B.
- The second one has a list of users with the following fields:
- UserID.
- 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_DecklerCommunity 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.
- adealboran777Frequent Visitor
Thank you!