Forum Discussion
Measure to return text value from multiple tables
Hello,
I have a data set that looks at call data from 2 different tables. One table reflects calls made to an individual and the other calls made to accounts. Both tables have Call Type which can be things like phone/email/zoom etc. I am hoping to come to a solution without doing a union on the two tables as the Individuals call table has many more columns than the Account calls table that I would like to keep.
Sample Data:
Individuals Call Table:
| First Name | Last Name | Date | Call Type | Title |
| Joe | Smith | 12/16/20 | Phone | Analyst |
| John | White | 12/16/20 | Manager | |
| Bill | Brown | 12/16/20 | Zoom | Customer Service |
| Bob | Gray | 12/16/20 | Phone | IT |
Accounts Call Table:
| Account Name | Date | Call Type |
| XYZ Inc | 12/16/20 | Phone |
| 123 Corp | 12/16/20 | |
| ABC Industries | 12/16/20 | Zoom |
| 789 llc | 12/16/20 | Phone |
I then have these measures:
Account Calls = Countrows ( 'Accounts Call Table' )
Individual Calls = Countrows ( 'Individuals Call Table' )
Total Calls = [Account Calls] + [Individual Calls]
Now I would like to be able to see a breakdown of my Total Calls by Call Type.. desired result would be:
| Call Type | # of Calls |
| Phone | 4 |
| 2 | |
| Zoom | 2 |
I can't figure out a measure that will bring in the associated call type across the 2 different tables. Any help would be appreciated.
Orelim - Perhaps create a table with just the values of your call types. You can do this in an Enter Data query or using DISTINCT. Relate that to both of your tables. Then use that column in this new table in your visual and Total Calls measure.
2 Replies
- Greg_DecklerCommunity Champion
Orelim - Perhaps create a table with just the values of your call types. You can do this in an Enter Data query or using DISTINCT. Relate that to both of your tables. Then use that column in this new table in your visual and Total Calls measure.
- OrelimNew Member
Greg_Deckler simple and exactly what I was looking for. Thank you