Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

new column / number of observations per group

How to create a new column and show the nomber of obs per group

 

Table A

obs  group value numberOfOBsPerGroup.

1  A   100    3

2  A    150    3

3  A    125    3

4  B    74      2

5  B    60     2

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Follow these steps:

 

1- Go to Modeling and hit on New column

Capture-1.PNG

 

 

2. A new column will be added in the field area like this:

Capture-2.PNG

 

 

3. Click on that and add this formula here

Capture-3.PNG

My output:

Capture-4.PNG

Let me know for any if this works.

 

Thanks,

Tejaswi

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

Follow these steps:

 

1- Go to Modeling and hit on New column

Capture-1.PNG

 

 

2. A new column will be added in the field area like this:

Capture-2.PNG

 

 

3. Click on that and add this formula here

Capture-3.PNG

My output:

Capture-4.PNG

Let me know for any if this works.

 

Thanks,

Tejaswi

az38
Community Champion
Community Champion

hi @Anonymous 

try a simple measure if i understand you correct

Measure = calculate(count('Table'[obs]),ALLEXCEPT('Table','Table'[group]))

will it be ok for you?

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.