Forum Discussion
automated_user
4 years agoFrequent Visitor
For each instance a string value appears in a column add to a sum for that specific value
Hi, I need help with getting a summed value based on the number of times a string value from one column appears in another column. For example: For each distinct value in a column named PartNum: ...
- 4 years ago
I was able to figure it out through a measure. In the calculation I also filter by the given year it appears in as well.
automated_user
4 years agoFrequent Visitor
v-yalanwu-msft NonConfig-PN can be any range of numbers. But here is an example:
| PartNum | RowCount.PseudoLines | NonConfig-PN | Total |
| aaa | bbb | 4 | 2 |
| ccc | aaa | 1 | 3 |
| aaa | ddd | 0 | 2 |
| bbb | bbb | 2 | 6 |
| bbb | aaa | 1 | 6 |
| ddd | ccc | 3 | 0 |
| aaa | ddd | 0 | 2 |
So if you take 'aaa' from PartNum and find each instances of it in the RowCount.PseudoLines.. for that instance it appears you would sum up the NonConfig-PN in that row it appears in. So the Total would be '2' for 'aaa'.
Hope this helps!
automated_user
4 years agoFrequent Visitor
I was able to figure it out through a measure. In the calculation I also filter by the given year it appears in as well.