Forum Discussion

MP87's avatar
MP87
New Member
2 years ago
Solved

Help with Counting

I have data that identifies internal part numbers, along with manufacturer names and part numbers. I am trying to provide information on how many, and what, items have a certain number of parts listed. For example, one user wants a report on all internal part numbers with only one manufacturer, while another user wants a listing of all internal numbers with either 2 or 3 manufacturers.

 

An example of my data is as follows:

 

Internal Part NumberManufacturerMFG Part Number
123ABC789
123XYZ789
456ABC1010
654ABC555
654XYZ888
654HIJ4545

 

I want the user to be able to select 1 manufacturer, and see just 456. Select 2 and see 123. Select more than 1 and see 123 and 456.

 

Thanks in advance

  • Hi MP87 

    If I understood you correctly, you can add a calculated column that will count the manufacturers for every part.
    The formula that you can use for this :

    count manufacturers for part = CALCULATE(DISTINCTCOUNT('Table'[Manufacturer]), ALLEXCEPT('Table','Table'[Internal Part Number]))

    and use this column as a slicer :

    the pbix is attached

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

1 Reply

  • Hi MP87 

    If I understood you correctly, you can add a calculated column that will count the manufacturers for every part.
    The formula that you can use for this :

    count manufacturers for part = CALCULATE(DISTINCTCOUNT('Table'[Manufacturer]), ALLEXCEPT('Table','Table'[Internal Part Number]))

    and use this column as a slicer :

    the pbix is attached

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly