Forum Discussion
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 Number | Manufacturer | MFG Part Number |
| 123 | ABC | 789 |
| 123 | XYZ | 789 |
| 456 | ABC | 1010 |
| 654 | ABC | 555 |
| 654 | XYZ | 888 |
| 654 | HIJ | 4545 |
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
- Ritaf1983Super User
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