Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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!
Solved! Go to Solution.
try a calculated column
Counter= ([Field 1]=30)+([Field 2]=30)+([Field 3]=30)
try a calculated column
Counter= ([Field 1]=30)+([Field 2]=30)+([Field 3]=30)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 8 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 29 | |
| 22 | |
| 17 | |
| 11 | |
| 10 |