Forum Discussion
Commonality across branches
I have a table that has multiple entries of items by multiple branches. I need to find the commonality between the items and branches. For instance, if an item is sold 5 times in 3 distinct branches, the result would be 3.
An example of my data would look like this:
| Item | Branch |
| 1 | A |
| 1 | B |
| 1 | D |
| 2 | A |
| 2 | C |
| 3 | C |
| 3 | C |
| 3 | D |
| 3 | D |
| 3 | D |
| 3 | E |
| 5 | A |
| 5 | B |
| 5 | E |
| 5 | E |
| 5 | F |
| 6 | A |
| 6 | A |
| 6 | A |
| 6 | A |
| 6 | F |
| 7 | B |
| 7 | B |
| 7 | C |
| 7 | D |
| 7 | F |
| 7 | F |
| 8 | B |
| 8 | C |
| 8 | D |
| 8 | D |
| 9 | C |
| 9 | C |
| 9 | D |
| 9 | F |
| 10 | E |
| 10 | E |
I'd want my results to look like this when grouped by item:
| Item | Branches in Common |
| 1 | 3 |
| 2 | 2 |
| 3 | 3 |
| 4 | 0 |
| 5 | 3 |
| 6 | 2 |
| 7 | 4 |
| 8 | 3 |
| 9 | 3 |
| 10 | 1 |
4 Replies
- Ashish_Mathur
Super User
Hi,
Drag Item to the Table visual and write this measure
Count = distinctcount(Data[Branch])
Hope this helps.
- ryan_mayu
Super User
you need to create a dim table
Table 2 = GENERATESERIES(min('Table'[Item]),max('Table'[Item]),1)
then you can create relationships
at last , create a measure
Measure = DISTINCTCOUNT('Table'[Branch])+0
pls see the attachment below
- v-saisrao-msft
Community Support
HI kleetus,
Have you had a chance to review the solution shared by Ashish_Mathur ryan_mayu ? If the issue persists, feel free to reply so we can help further.
Thank you.
- v-saisrao-msft
Community Support
Hi kleetus,
Checking in to see if your issue has been resolved. let us know if you still need any assistance.
Thank you.