Forum Discussion

kleetus's avatar
kleetus
New Member
17 days ago

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:

ItemBranch
1A
1B
1D
2A
2C
3C
3C
3D
3D
3D
3E
5A
5B
5E
5E
5F
6A
6A
6A
6A
6F
7B
7B
7C
7D
7F
7F
8B
8C
8D
8D
9C
9C
9D
9F
10E
10E

I'd want my results to look like this when grouped by item:

ItemBranches in Common
13
22
33
40
53
62
74
83
93
101

4 Replies

  • Hi,

    Drag Item to the Table visual and write this measure

    Count = distinctcount(Data[Branch])

    Hope this helps.

  • kleetus​ 

    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's avatar
    v-saisrao-msft
    Icon for Community Support rankCommunity Support

    Hi kleetus​,

    Checking in to see if your issue has been resolved. let us know if you still need any assistance.

    Thank you.