Forum Discussion
fabio7xavier
6 years agoFrequent Visitor
New column based on multiple column values
I have a table like this
| Field 1 | Field 2 | Field 3 |
| 10 | 10 | 30 |
| 30 | 30 | 10 |
| 10 | null | 30 |
| 10 | 30 | 10 |
| 30 | 30 | 30 |
And I would like to generate a new column that will count how many '30' exists in each row.
For this example, the result would be:
| Field 1 | Field 2 | Field 3 | Counter |
| 10 | 10 | 30 | 1 |
| 30 | 30 | 10 | 2 |
| 10 | null | 30 | 1 |
| 10 | 30 | 10 | 1 |
| 30 | 30 | 30 | 3 |
What is the best solution for this?
It will be easier to do this from DAX or by creating an advanced query.
Thank you!
1 Reply
- az38Community Champion