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
Hi,
I have data like this:
| ID | Category |
| A | C1 |
| A | C2 |
| A | C2 |
| B | C1 |
| B | C1 |
| B | C2 |
I want an extra column with the rowcount for Category C1 within each group. So that I get a result like this:
| Group | Category | Category C1 Count |
| A | C1 | 1 |
| A | C2 | 1 |
| A | C2 | 1 |
| B | C1 | 2 |
| B | C1 | 2 |
| B | C2 | 2 |
I only got this far:
Solved! Go to Solution.
@Anonymous , Try a new Measure like
calculate(COUNTROWS(Table), filter(allselected(Table) , Table[Group] = max(Table[Group]) && Table[Category] ="C1"))
@Anonymous , Try a new Measure like
calculate(COUNTROWS(Table), filter(allselected(Table) , Table[Group] = max(Table[Group]) && Table[Category] ="C1"))
@amitchandak Thank you for your reply! As a measure I see that it works, but I need is as a column, is there a posibility you think?
Ah, I just used the measurement to add as a colum and that works perfectly :)!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |